class turicreate.recommender.popularity_recommender.PopularityRecommender(model_proxy)

The Popularity Model ranks an item according to its overall popularity.

When making recommendations, the items are scored by the number of times it is seen in the training set. The item scores are the same for all users. Hence the recommendations are not tailored for individuals.

The Popularity Recommender is simple and fast and provides a reasonable baseline. It can work well when observation data is sparse. It can be used as a “background” model for new users.

Creating a PopularityRecommender

This model cannot be constructed directly. Instead, use turicreate.recommender.popularity_recommender.create() to create an instance of this model. A detailed list of parameter options and code samples are available in the documentation for the create function.

See also



PopularityRecommender.evaluate(dataset[, …]) Evaluate the model’s ability to make rating predictions or recommendations.
PopularityRecommender.evaluate_precision_recall(dataset) Compute a model’s precision and recall scores for a particular dataset.
PopularityRecommender.evaluate_rmse(dataset, …) Evaluate the prediction error for each user-item pair in the given data set.
PopularityRecommender.export_coreml(filename) Export the model in Core ML format.
PopularityRecommender.get_num_items_per_user() Get the number of items observed for each user.
PopularityRecommender.get_num_users_per_item() Get the number of users observed for each item.
PopularityRecommender.get_similar_items([…]) Get the k most similar items for each item in items.
PopularityRecommender.get_similar_users([…]) Get the k most similar users for each entry in users.
PopularityRecommender.predict(dataset[, …]) Return a score prediction for the user ids and item ids in the provided data set.
PopularityRecommender.recommend([users, k, …]) Recommend the k highest scored items for each user.
PopularityRecommender.recommend_from_interactions(…) Recommend the k highest scored items based on the
PopularityRecommender.save(location) Save the model.
PopularityRecommender.summary([output]) Print a summary of the model.