Oracle9iAS Personalization User's Guide Release 2(v9.0.2) Part Number A95244-02 |
|
This chapter presents several exercises using the REAPI Demo.
Running the REAPI Demo accomplishes the following:
For detailed information about the REAPI, see the Oracle9iAS Personalization Recommendation Engine API Programmer's Guide.
For details about installing REAPI, see the Oracle9i Application Server Administrator's Guide.
In a production environment, the REAPI calls are used to "instrument" a Web site so that you can collect the data needed to create good models and generate recommendations.
The REAPI and the REAPI Demo are installed on the system where Oracle9iAS is installed.
Before running the REAPI Demo, you need to have created and deployed a package to the recommendation engine so that there is data available for making recommendations.
When you install OP, choose the option to install the demo data into the MTR.
Next, use the OP Administrative UI (described in Chapter 2) to perform the following steps:
After the movies package is successfully deployed to the RE Farm, you can begin experimenting with the REAPI demo to see how the REAPI calls work.
When you are ready to begin working with the REAPI Demo, point your browser to the following URL:
http://<hostname>/OP/redemo/
where <hostname>
is the name of the system on which Oracle9iAS is installed. This will bring up the REAPI Demo user interface. The first page that appears is the Welcome to OP REAPI Demo page.
REAPI calls execute in the context of a proxy, which specifies the environment in which the calls execute. One of the important elements of the environment is the default RE schema. You must create a proxy before you execute any calls, as shown in the steps outlined below.
While you are running the REAPI Demo, you can view the source code for the demo by clicking the View Source Code link.
REAPI Demo is implemented as a Java servlet consisting the following classes:
You can view the source code for each of these classes; you can also download the classes to your desktop.
This section provides exercises that you can work through to get a feel for how the REAPI Demo works. The exercises cover the following tasks:
To get meaningful results from these examples, you must enter valid values (that is, values for which there are recommendations) to REAPI Demo. All the values in this demo produce useful results. You can determine other values by examining the populated MTR provided with OP.
The results returned when you execute the calls will be similar to but not identical to the results displayed in this document.
You must create a proxy before you execute any calls. Here's how: In the frame on the left of the REAPI Demo screen, click createProxy, and enter these values:
jdbc:oracle:thin:<host>:<port>:<sid>
Enter the values that were specified during OP installation for host, port, and SID.
Click Create RE Proxy.
REAPI Demo displays a message indicating success or failure. (REAPI Demo does this for every action.)
Follow these steps to experiment with any of the methods listed under the heading "Sessionful." (These are the methods that are valid with a sessionful Web application.)
A sessionful Web application starts a session for each customer when the customer logs in to the site.
Click Create Session.
Click Recommend Top N.
OP then returns 10 or fewer recommendations for the user of this session. It will look something like the table below, which displays information for four movies. It displays the item type (MOVIE, for each), the item ID (a unique number for each item), and the ranking of the four movies, ranked on the likelihood of being purchased):
Recommended Top N Items for User ID = 1
Type | Item ID | Rating |
---|---|---|
MOVIE |
345 |
1.000 |
MOVIE |
383 |
2.000 |
MOVIE |
447 |
3.000 |
MOVIE |
223 |
4.000 |
Click Add>> to move this item to the list; click Add Items to add it to the RE. This updates the information in the RE tables for this user.
Click Recommend Hot Picks.
OP then returns 10 or fewer recommendations for the user of this session. In this case, it returns something like what is shown in the table below. Again, it displays the item type (MOVIE), the item ID (a number identifying each movie), and the rating.
Recommended Hotpick Items for User ID = 1
Type | Item ID | Rating |
---|---|---|
MOVIE |
360 |
1.0000 |
MOVIE |
370 |
2.0000 |
MOVIE |
116 |
3.0000 |
MOVIE |
83 |
4.0000 |
MOVIE |
28 |
5.0000 |
MOVIE |
20 |
6.0000 |
Click Add>> to add this item to the list. You can add other items to the list, if you wish.
REAPI Demo returns the following:
Rate Items for User ID = 1
Type | Item ID | Rating |
---|---|---|
MOVIE |
72 |
4.3071 |
MOVIE |
287 |
4.3453 |
MOVIE |
122 |
4.3569 |
If your Web site does not start a session for each visitor or customer, you use the calls listed under Sessionless. For each of these calls, you provide the identification data for user and session. Otherwise, the calls are identical to sessionful ones. This example illustrates several sessionless calls.
When you have finished adding items, click Cross-Sell for Items from Hot Picks.
OP then returns 10 or fewer recommendations for the user of this session. In this case, it returns the following:
Cross-Sell for Items for Hot Picks for User ID = 1
Type | Item ID | Rating |
---|---|---|
MOVIE |
72 |
1.2785 |
If a visitor registers as a user during a session, you need to change the visitor to a customer. You can only change a visitor to a customer during a session that the user entered as a visitor.
REAPI Demo displays a message that announces SUCCESS!
You can close the session now or continue experimenting, as you like.
This chapter has presented exercises to show you how the REAPI works.
The Demo is different from the way you would use the REAPI calls in practice. In practice, you would embed the REAPI calls in a Java program that you write, and you would execute the program as you ordinarily do.
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|