Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify API for rank_items/recommend/recommend_all #489

Closed
Tracked by #481
benfred opened this issue Nov 2, 2021 · 0 comments · Fixed by #493
Closed
Tracked by #481

Unify API for rank_items/recommend/recommend_all #489

benfred opened this issue Nov 2, 2021 · 0 comments · Fixed by #493

Comments

@benfred
Copy link
Owner

benfred commented Nov 2, 2021

We have 3 different methods for recommending items to users : recommend, recommend_all and rank_items. All three of these are inconsistent with the others:

  • recommend_all doesn’t return scores for recommendations, just ranked items - whereas recommend/rank_items do
  • recommend_all throws errors if we would filter out too many items for any user, where rank_items/recommend just return fewer items
  • rank_items doesn’t support filtering users own likes, whereas recommend/recommend_all do
  • recommend has a batch mode operation in recommend_all - but rank_items doesn't have a corresponding batch mode
  • recommend_all only works on the CPU versions of MF models - and isn't included on KNN or GPU models

We should consolidate down to a single method (recommend) which will take either a single userid or a vector of userids to compute recommendations for. We should augment the filtering options, which currently allow you to exclude items, with another parameter (items) which will force only including items on it. This is like adding an item whitelist to the recommend method, to complement the filter_items blacklist parameter we already have - and would make rank_items redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant