Popularity Recommender
The popularity recommender is built using Polars to create a simple but fast popularity recommender, recommending items based on global popularity and personal past interaction. It identifies the most popular items from the entire dataset and excludes any items a user has already interacted with. Its straightforward methodology makes it an excellent benchmark for comparing more sophisticated recommendation engines. The ideal use cases for this handler include analyzing ecommerce rating data, web page browsing data, or past purchase data for serving users recommendations.
As the current implementations stand, the input data should be a table containing user-item interaction data:
Please note that at the moment this integrations does not support DESCRIBE
and FINETUNE
features.
Example
Before creating a popularity recommender model, we need to create an ML engine.
You can verify it by running SHOW ML_ENGINES
.
Now let’s create a popularity recommender model specifying the necessary input parameters.
The required parameters include the following:
- The
item_id
parameter that stores items to be recommended; here, these are movies. - The
user_id
parameter that stores users to whom items are recommended. - The
n_recommendations
parameter stores the number of recommendations to be returned.
Here is how to connect the mysql_demo_db
used for training the model:
Here is how to get recommendations per user based on the global most popular items:
And here is how to get recommendations for specific users based on popularity:
Was this page helpful?