Skip Headers
Oracle® Application Server Personalization Programmer's Guide
10g Release 2 (10.1.2)
B14051-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

8 Using the Recommendation Engine Batch Proxy

This chapter consists of an overview of the class and methods that are used to manage the customer profiles and to obtain recommendations. The supporting classes for these methods are described in Chapter 7.

For detailed descriptions of these methods, see the Javadoc in the OracleAS Personalization section of the Oracle Application Server 10g Documentation Library.

All methods described in this chapter are public.

8.1 REProxy Batch Overview

The recommendation proxy (REBatchProxy) methods can be divided according to function, as follows:

For examples of how to use these classes and methods, see Chapter 9.

8.2 Location of REProxyBatch Classes

To use the REProxyBATCH (and its exceptions), you must include the following statements in your Java program:

   import oracle.dmt.op.re.reapi.batch.*;

   import oracle.dmt.op.re.reexception.*;

These classes are installed on the system where Oracle Application Server is installed.

8.2.1 REProxyBatch Creation and Management

The REProxyBatch.java class establishes the JDBC connection to the RE schema where the methods execute. The connection continues to exist until the connection is explicitly destroyed with the destroy() method. The class also includes customer profile management methods.

8.2.1.1 Customer Profile Management

You must load customer profiles from the MTR to the RE before you can request recommendations; after you are done, you should purge the loaded profiles from the RE. The methods are

  • LoadCustomerProfiles();

  • PurgeCustomerProfiles();

8.2.2 REProxyBatch Recommendations

The following methods obtain recommendations:

  • crossSellForItems

  • rateItem

  • recommendTopItems

Communicating the returned recommendations to the end user is the responsibility of the application. The recommendations are written to an output table; the schema of the output table depends on the method called. For details, see the description of each method.

8.2.2.1 Ratings in OracleAS Personalization

Ratings in OracleAS Personalization are in "ascending order of goodness", that is, the higher the rating, the more the user prefers the item. Low-rated items are items that the user does not prefer. OracleAS Personalization algorithms use these assumptions, so it is important that ratings are in ascending order of goodness.

8.2.2.2 Meaning of Returned Value for Recommendations

The meaning of the value returned for recommendation instances where ItemDetailData.attribute is equal to Enum.RecommendationAttribute.PREDICTION depends on the value of interestDimension as follows:

  • For InterestDimension.RATING, the expected rating for the item is returned.

  • For InterestDimension.PURCHASING or InterestDimension.NAVIGATION, a scaled probability is returned. The most probable item is assigned a value of 1 and other items are assigned values less than 1 that are proportional to how probable the items are compared to the most probable item.

8.2.2.3 Cross Sell Method Usage Notes

The comments in this section apply to recommendCrossSellForItems.

Interest dimension must be the same as that of the data source type of the input item.

Data source type must be either navigational or purchasing. No other types are supported.

The following filtering setting cannot be used with this method:

  • setCategoryLevelFiltering

  • setCategorySubtreeFiltering

  • setCategoryExclusion

  • setCategoryFiltering(int)

  • setCategoryFiltering(int, long[])

8.2.2.4 Recommendation Method Usage Notes

recommendTopItems does not necessarily return a list of items. If you set FilteringSettings.CategoryMembership to one of the values

  • Enum.CategoryMembership.EXCLUDE_CATEGORIES

  • Enum.CategoryMembership.INCLUDE_CATEGORIES

  • Enum.CategoryMembership.SUBTREE_CATEGORIES

  • Enum.CategoryMembership.ALL_CATEGORIES

then recommendTopItems returns a list of categories.

Categories are components of a taxonomy. Taxonomies are defined in the following tables in the mining table repository (MTR):

  • MTR_TAXONOMY

  • MTR_TAXONOMY_CATEGORY

  • MTR_TAXONOMY_CATEGORY_ITEM

  • MTR_CATEGORY

An appropriate taxonomy is crucial to the design of an OracleAS Personalization application. For information about how to create taxonomies, see Oracle Application Server Personalization Administrator's Guide.

8.3 REProxyBatch Rules and Recommendations

OracleAS Personalization uses rule tables stored in the RE to generate the recommendations requested by the recommendation methods. The rule tables are created when a package is built and stored in the RE when the package is deployed. The specific rule table used depends upon the RE Batch API call made. In general, the antecedents of the rules are matched against the data in cache (historical data only for RE Batch) and the probabilities of the various consequents are computed. These items are then ordered by probability, and numberOfItems (an API argument) items are returned.