turicreate.recommender.popularity_recommender.PopularityRecommender

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

create

Methods

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