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

Api refactor #494

Merged
merged 10 commits into from
Jan 3, 2022
Merged

Api refactor #494

merged 10 commits into from
Jan 3, 2022

Conversation

benfred
Copy link
Owner

@benfred benfred commented Nov 26, 2021

No description provided.

@benfred benfred linked an issue Nov 26, 2021 that may be closed by this pull request
6 tasks
Change recommend/rank_items/similar_items/similar_users to return a numpy array of ids
and a numpy array of scores,  rather than return a python list of (itemid, score) tuples.

This opens up options for batch processing in the future, and can be trivially converted
by users into the previous format (liked ```zip(*model.recommend(...))```.
Previously, model.fit took an item_users sparse matrix, while model.recommend took a user_items
 sparse matrix.  This was a source of confusion, so change the model.fit method to be consistent
 with model.recommend
Add batch mode operations for recommend, add an item list parameter and deprecate the
rank_items and recommend_all methods.
Approximate nearest neighbours used to only work for the ALS mode on the CPU.

This change makes it so that we can compose ANN methods with any matrix factorization
model (including BPR/LMF) and also use the GPU MF models as well.

Currently this provides the same api in implicit/approximate_als.py for backwards
compatibility - but this may be removed at a future date.

Closes #487
@benfred benfred linked an issue Jan 3, 2022 that may be closed by this pull request
@benfred benfred merged commit 2ca0927 into main Jan 3, 2022
@benfred benfred mentioned this pull request Jan 3, 2022
@benfred benfred linked an issue Jan 3, 2022 that may be closed by this pull request
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 this pull request may close these issues.

API Refactor How to compute rank_items for all my users? Clarify or rename filter_items
1 participant