Oracle9iAS Personalization Programmer's Guide Release 2 (v9.0.2) Part Number A95245-02 |
|
The sample program for RE Proxy Batch consists of a Java program and a property file. The sample program, property file, and the tables required to run it are installed when you install OP.
The Java program REBatchTest.java
and the property file batchtest.txt
are in the TBS
directory on the system where you have installed OP.
REBatchTest.java
REProxyBatch
allows you to execute a subset of recommendation functions in bulk. (REProxyRT
scores one user/item at a time.) REProxyBatch
reads a list of items/customers to be scored from an input table and writes the result to a new output table. This program reads its input from the property file batchtest.ini
.
The input item details (for rateItem
and crossSellForItem
) are derived from the OP demo data. But in OP, the model built on the same data is not guaranteed to produce the same rules each time that it is run.Therefore, it is possible that the item being rated cannot be rated with the current set of rules. The output tables will either be empty (zero rows) or will contain fewer than expected records (if only some of the items are valid cross-sell candidates etc.).
Follow these steps to execute the sample program:
load_batch_demo_data.sh
to load the following tables:
CLASSPATH
variable should include the following zip/jar files:
It also needs to include JDBC related jar/zip files:
README.txt
describes the exact changes that must be made.
REBatchTest
, with the property file name as an input parameter.
This section contains the code for the sample program and its property file.
The properties file for the sample program follows. Note that you must replace RE details and input/output table details to reflect your installation.
### ### Input file for REProxyBatch sample program ### Before Running, you will need to replace the following dummy strings with actual information: ### 1. RE* details ( Url,Username,Password) to point to the RE. ### 2. Input and Output (Result) table details for each of the calls. #A unique name for proxy ProxyName=REB_1 #Recommendation Engine details REUrl=jdbc:oracle:thin:@myDBUrl REUsername=REUser REPassword=REPassword #Input customer table location Input.Url=jdbc:oracle:thin:@myDBUrl Input.Alias=myDBAlias Input.Schema=User1 Input.Table=customer_list_in Input.Username=User1 Input.Password=Password1 #Customer profile table # This table is created in RE by loadCustomerProfile. Once created # it is used for recommendTopItems and rateItem CustProfile=MY_CUSTOMER_PROFILE # # Details for recommendTopItems # # Number of items to be recommended per customer TopN.NumberOfItems=10 #TuningSettings details #valid DataSourceTypes are ALL, DEMOGRAPHIC, PURCHASING, RATING, NAVIGATION TopN.DataSourceType=ALL #valid InterestDimension: PURCHASING, RATING, NAVIGATION TopN.InterestDimension=PURCHASING #valid PersonalizationIndex: LOW, MEDIUM, HIGH TopN.PersonalizationIndex=MEDIUM ## ProfileDataBalance needs to be specified as part of the TuningSettings object ## but its value is not used by REProxyBatch #valid ProfileDataBalance: HISTORY, CURRENT, BALANCED TopN.ProfileDataBalance=HISTORY #valid ProfileUsage:INCLUDE, EXCLUDE TopN.ProfileUsage=INCLUDE # FilteringSettings details TopN.Taxonomy=1 #Category list is a series of numbers separated by "-" TopN.CategoryList=1-2-3-4-5 #Valid CategoryMembership: ExcludeItems, ExcludeCategories, IncludeItems, IncludeCategories, # level, SubTreeItems, SubTreeCategories, AllItems, AllCategories TopN.CategoryMember=AllItems # Result table details TopNResult.Url=jdbc:oracle:thin:@myDBUrl TopNResult.Alias=myDBAlias TopNResult.Schema=User2 TopNResult.Table=TopN_RESULTS TopNResult.Username=User2 TopNResult.Password=Password2 # # Details for rateItem # #TuningSettings details RateI.ItemID=417 RateI.ItemType=MOVIE RateI.DataSourceType=RATING RateI.InterestDimension=RATING RateI.PersonalizationIndex=LOW ## ProfileDataBalance needs to be specified as part of the TuningSettings object ## but its value is not used by REProxyBatch RateI.ProfileDataBalance=HISTORY RateI.ProfileUsage=INCLUDE RateI.Taxonomy=1 # Result table details RateIResult.Url=jdbc:oracle:thin:@myDBUrl RateIResult.Alias=myDBAlias RateIResult.Schema=User3 RateIResult.Table=RATEITEM_RESULTS RateIResult.Username=User3 RateIResult.Password=Password3 # # Details for crossSellForItem # #Input items table details ItemTable.Url=jdbc:oracle:thin:@myDBUrl ItemTable.Alias=myDBAlias ItemTable.Schema=User4 ItemTable.Table=item_list_in ItemTable.Username=User4 ItemTable.Password=User4 # Number of items to be recommended per input item XSell.NumberOfItems=10 #TuningSettings details XSell.DataSourceType=NAVIGATION XSell.InterestDimension=NAVIGATION XSell.PersonalizationIndex=HIGH ## ProfileDataBalance needs to be specified as part of the TuningSettings object ## but its value is not used by REProxyBatch XSell.ProfileDataBalance=HISTORY XSell.ProfileUsage=EXCLUDE #FilteringSettings details XSell.Taxonomy=1 XSell.CategoryList=1-3-5-7-9 XSell.CategoryMember=AllItems # Result table details XSellResult.Url=jdbc:oracle:thin:@myDBUrl XSellResult.Alias=myDBAlas XSellResult.Schema=User4 XSellResult.Table=XSELL_RESULTS XSellResult.Username=User5 XSellResult.Password=Password5
The sample program follows. Note that you must replace RE details and input/output table details to reflect your installation.
### ### Input file for REProxyBatch sample program ### Before Running, you will need to replace the following dummy strings with actual information: ### 1. RE* details ( Url,Username,Password) to point to the RE. ### 2. Input and Output (Result) table details for each of the calls. #A unique name for proxy ProxyName=REB_1 #Recommendation Engine details REUrl=jdbc:oracle:thin:@myDBUrl REUsername=REUser REPassword=REPassword #Input customer table location Input.Url=jdbc:oracle:thin:@myDBUrl Input.Alias=myDBAlias Input.Schema=User1 Input.Table=customer_list_in Input.Username=User1 Input.Password=Password1 #Customer profile table # This table is created in RE by loadCustomerProfile. Once created # it is used for recommendTopItems and rateItem CustProfile=MY_CUSTOMER_PROFILE # # Details for recommendTopItems # # Number of items to be recommended per customer TopN.NumberOfItems=10 #TuningSettings details #valid DataSourceTypes are ALL, DEMOGRAPHIC, PURCHASING, RATING, NAVIGATION TopN.DataSourceType=ALL #valid InterestDimension: PURCHASING, RATING, NAVIGATION TopN.InterestDimension=PURCHASING #valid PersonalizationIndex: LOW, MEDIUM, HIGH TopN.PersonalizationIndex=MEDIUM ## ProfileDataBalance needs to be specified as part of the TuningSettings object ## but its value is not used by REProxyBatch #valid ProfileDataBalance: HISTORY, CURRENT, BALANCED TopN.ProfileDataBalance=HISTORY #valid ProfileUsage:INCLUDE, EXCLUDE TopN.ProfileUsage=INCLUDE # FilteringSettings details TopN.Taxonomy=1 #Category list is a series of numbers separated by "-" TopN.CategoryList=1-2-3-4-5 #Valid CategoryMembership: ExcludeItems, ExcludeCategories, IncludeItems, IncludeCategories, # level, SubTreeItems, SubTreeCategories, AllItems, AllCategories TopN.CategoryMember=AllItems # Result table details TopNResult.Url=jdbc:oracle:thin:@myDBUrl TopNResult.Alias=myDBAlias TopNResult.Schema=User2 TopNResult.Table=TopN_RESULTS TopNResult.Username=User2 TopNResult.Password=Password2 # # Details for rateItem # #TuningSettings details RateI.ItemID=417 RateI.ItemType=MOVIE RateI.DataSourceType=RATING RateI.InterestDimension=RATING RateI.PersonalizationIndex=LOW ## ProfileDataBalance needs to be specified as part of the TuningSettings object ## but its value is not used by REProxyBatch RateI.ProfileDataBalance=HISTORY RateI.ProfileUsage=INCLUDE RateI.Taxonomy=1 # Result table details RateIResult.Url=jdbc:oracle:thin:@myDBUrl RateIResult.Alias=myDBAlias RateIResult.Schema=User3 RateIResult.Table=RATEITEM_RESULTS RateIResult.Username=User3 RateIResult.Password=Password3 # # Details for crossSellForItem # #Input items table details ItemTable.Url=jdbc:oracle:thin:@myDBUrl ItemTable.Alias=myDBAlias ItemTable.Schema=User4 ItemTable.Table=item_list_in ItemTable.Username=User4 ItemTable.Password=User4 # Number of items to be recommended per input item XSell.NumberOfItems=10 #TuningSettings details XSell.DataSourceType=NAVIGATION XSell.InterestDimension=NAVIGATION XSell.PersonalizationIndex=HIGH ## ProfileDataBalance needs to be specified as part of the TuningSettings object ## but its value is not used by REProxyBatch XSell.ProfileDataBalance=HISTORY XSell.ProfileUsage=EXCLUDE #FilteringSettings details XSell.Taxonomy=1 XSell.CategoryList=1-3-5-7-9 XSell.CategoryMember=AllItems # Result table details XSellResult.Url=jdbc:oracle:thin:@myDBUrl XSellResult.Alias=myDBAlas XSellResult.Schema=User4 XSellResult.Table=XSELL_RESULTS XSellResult.Username=User5 XSellResult.Password=Password5
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|