What is a popularity model
A popularity model is an offline computing model and the most fundamental ranking algorithm model used in Taobao search. A popularity model calculates and quantifies the static quality and popularity of each product. The resulting value is called the product popularity score. Although the popularity model originated from the Taobao search business, it is also applicable to other search scenarios. In non-product search scenarios, you can also use a popularity model to calculate the popularity of indexed documents.
Features used for model training
Entity dimension: product/document, brand, merchant, leaf category, level-1 category, and more.
Time dimension: 1 day, 3 days, 7 days, 14 days, 30 days, time-decay weighting, and more.
Behavior dimension: impression, click, add to favorites, add to cart, purchase, comment, like, and more.
Statistics dimension: count, number of users, frequency, click-through rate, conversion rate, and more.
Each feature is formed by combining one or two items from each of the preceding four dimensions, and the final value of the combined feature is then calculated from historical data. Examples: the number (statistical metric) of impressions (behavior) of a product (entity) in the last day (time), or the sales (behavior type + statistics dimension) of the store where a product is sold (entity) in the last 30 days (time). The number of features generated by this method is on the order of the Cartesian product of the four dimensions.
Procedure overview
Create a model.
Train the model and check the data report.
Apply the model in Sort Configuration > Policy Management.
[Note]: You can create up to 5 popularity models for a single application.
Creation procedure
1. To create a popularity model, go to the console, choose Search Algorithm Center > Sort Configuration > Popularity Model, and click Create.
Enter a model name as required and click OK.
On the page for creating a popularity model, select a Target Application (for example, medical) and enter a Model Name (for example, test_02). The model name must be 1 to 30 characters in length, start with a letter, and contain only uppercase and lowercase letters, digits, and underscores. It must be different from the names of other models. For data preparation, you must upload behavior data such as impressions and clicks by using the data collection SDK, and make sure that the application receives sufficient traffic. After you complete the settings, click OK.
2. After you click OK, the page displays a success message stating that the popularity model is created, along with the operations that you can perform next:
View the data report to check whether the data quality meets the requirements.
Evaluate the model performance by using Search Test or A/B testing.
Apply the popularity score in the sort configuration.
Click Complete.
3. Choose Sort Configuration > Popularity Model and click Train Model. The status changes to Scheduling. Wait until the model training is complete.
Apply a popularity model to ranking
After a popularity model is trained, a product popularity score (the quantified value of the static quality and popularity of a document) is calculated for each document. To make the popularity score take effect in online search ranking, you must create or edit a sort policy in Sort Configuration > Policy Management and reference the scoring results of the model. This corresponds to Step 3, "Apply the model in Sort Configuration > Policy Management", in the Procedure overview section above.
When you create a sort policy in Policy Management, you can select the scope (Basic Sort or Business Sort) and configure a sort expression. For information about how to create a sort policy, configure scoring features and weights, and write sort expressions, see Configure sort policies.
After the policy is configured, specify the sort policies to apply in query requests by using first_rank_name (basic sort policy) and second_rank_name (business sort policy). The popularity score then participates in online ranking score calculation. On the Search Test page, you can turn on Show Sort Details to view the ranking score of each document and the final ranking results.
Popularity model details
Popularity model details page
The popularity model details page contains the following information:
Basic Information: creation time, last training start time, model status (Available), and latest version status (Trained and ready).
Configuration Information: scheduled task switch (on/off). You can click Edit Scheduled Task to modify it.
Data Validation: data integrity status (Data Available) and integrity level (for example, l1). You can click Upgrade Conditions to view details.
Training History: a table that displays the model version, version status, training start time, and training end time.
Basic information
You can view the creation time, status, last training start time, and latest version status of the model.
Configuration information
Scheduled task: By default, the scheduled task is enabled and the model is trained once a day. You can also edit the scheduled task to customize the training cycle.
Data validation
The data integrity status can be Data Available or Data Abnormal.
The integrity report shows the integrity level of the current application. The following table describes the integrity levels:
Data integrity | Description | Upgrade condition |
l0 | The data is completely unavailable. Required core fields are missing or the data volume is too small, so subsequent data processing cannot proceed. | l0 --> l1: The number of IPVs (item page views) in the last day is greater than 100. |
l1 | The core fields of the data are available, and the conditions for model training are met. | None |
Related API/SDK reference: CreateFunctionResource.