This topic describes how to implement the etrec Recall.
Prerequisites
-
You have activated PAI and created a workspace. For more information, see Activate PAI and create a default workspace.
-
The workspace is associated with MaxCompute resources. For more information, see Quick start - Preparations.
Dataset
This solution uses the pai_online_project.rec_sln_demo_behavior_table demo table.
Field | Type | Description |
request_id | BIGINT | Request or tracking ID. |
user_id | BIGINT | The user's unique ID. |
exp_id | STRING | The experiment ID. |
page | STRING | The event page. |
net_type | STRING | The network type. |
event_time | BIGINT | The timestamp of the behavior. |
item_id | BIGINT | The item ID. |
event | STRING | The behavior type. |
playtime | DOUBLE | The playback or reading duration. |
ds | STRING | The name of the partition column. |
Etrec recall
Go to the Designer page.
Log on to the Machine Learning Platform for AI (PAI) console.
In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of your workspace.
In the left-side navigation pane of the workspace, choose Model Development and Training > Visualized Modeling (Designer).
Create a pipeline.
On the Designer page, click the Preset Templates tab.
In the Recommendation Solution - etrec Recall section of the template list, click Create.
In the Create Pipeline dialog box, configure the parameters. You can use the default values.
The Pipeline Data Path parameter specifies an Object Storage Service (OSS) bucket path. This path stores temporary data and models generated when the pipeline runs.
Click OK. It takes about 10 seconds to create the pipeline.
From the list of pipelines, double-click the Recommendation Solution - etrec Recall pipeline to open its canvas.
The system automatically builds the pipeline on the canvas based on the preset template, as shown in the following figure.

Component number
Description
1
Behavior weights.
2
Prepares 30 days of training samples for the Item-to-Item (I2I) model.
3
Improves the accuracy of the User-to-Item (U2I) trigger recall by weighting the user's historical item interactions.
4
Trains the etrec I2I collaborative filtering model.
5
Splits the etrec I2I scores into partitioned tables in KKV format.
6
Calculates the top 500 U2I2I Recall results by joining the U2I trigger table with the I2I table.
Run the pipeline and view the results
On the Global Variables tab, set
bizdateto20230216andymdto20230215.At the top of the canvas, click Run.
After the pipeline finishes running, view the MaxCompute table rec_sln_demo_etrec_u2i2i_score_v1 in DataWorks. For more information, see View table details. The result table contains three columns: user_id (user ID), item_ids (recommended item IDs and their scores, in the format
ItemID::Score,ItemID::Score), and ds (date partition).