Ranking

Updated at:

The Recommendation Solution - Rank uses user feature, item feature, and user behavior tables that are processed by feature engineering. The solution outputs a ranking model for model deployment. This topic describes how to implement the ranking solution.

Prerequisites

The datasets required for ranking are generated by running the Recommendation Solution - Feature Engineering workflow template. For more information, see Feature engineering.

  • rec_sln_demo_user_table_preprocess_all_feature_v2

  • rec_sln_demo_item_table_preprocess_all_feature_v2

  • rec_sln_demo_behavior_table_preprocess_v2

Implement ranking

  1. Go to the Machine Learning Designer page.

    1. Log on to the PAI console.

    2. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.

    3. In the left-side navigation pane, choose Model Training > Visualized Modeling (Designer).

  2. Build the workflow.

    1. On the Machine Learning Designer page, click the Preset Templates tab.

    2. In the template list, click Create under Recommendation Solution - Rank.

    3. In the Create Workflow dialog box, configure the parameters. You can use the default values.

      Set Workflow Data Storage to an OSS Bucket path, which is used to store temporary data and model files that the workflow generates. This path must be the same as the one used for feature engineering.

    4. Click OK. It takes about ten seconds to create the workflow.

    5. The system automatically builds the workflow based on the preset template, as shown in the following figure.image.png

      Component Number

      Description

      1

      The sample for the ranking model.

      2

      Performs feature generation (FG) operations on the sample based on the fg.json file. For more information, see the FG documentation. Attachments: fg_on_odps-1.3.59-jar-with-dependencies.jar, rec_sln_demo_rec_sln_demo_sorting_fg_v1.json

      3

      Performs equal frequency binning for numeric features. The boundaries are used for the discretization of numeric features.

      4

      Counts the number of unique values for enumeration features. This count is used to set the embedding_dim and hash_bucket_size of the model.

      5

      Shuffles the 30-day sample data of the rec_sln_demo_sorting model to form training samples.

      6

      Aggregates the results from the rec_sln_demo_rec_sln_demo_sorting_30d_binning_v2 and rec_sln_demo_rec_sln_demo_sorting_30d_count_v2 tables to calculate the feature and step configuration information.

      7

      Fills the configuration information in the EasyRec configuration file based on the calculation results from component 6. Attachment: rec_sln_demo_rec_sln_demo_sorting_v1_template.config

      Note

      This node needs to be run only once.

      8

      For model training, you must first run component 7 to generate the EasyRec configuration file. Attachment: fg.json