Skip to content

Return numpy arrays from recommend methods#482

Merged
benfred merged 1 commit into
api_refactorfrom
ids_scores
Oct 9, 2021
Merged

Return numpy arrays from recommend methods#482
benfred merged 1 commit into
api_refactorfrom
ids_scores

Conversation

@benfred

@benfred benfred commented Oct 9, 2021

Copy link
Copy Markdown
Owner

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(...)).

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(...))```.
@benfred benfred merged commit dcfdc37 into api_refactor Oct 9, 2021
@benfred benfred deleted the ids_scores branch October 9, 2021 18:22
@benfred benfred mentioned this pull request Oct 9, 2021
6 tasks
@benfred benfred linked an issue Oct 9, 2021 that may be closed by this pull request
6 tasks
@benfred benfred removed a link to an issue Nov 26, 2021
6 tasks
benfred added a commit that referenced this pull request Dec 31, 2021
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(...))```.
benfred added a commit that referenced this pull request Nov 21, 2022
#482 introduced a bug
where the output of the knn models wasn't strictly ordered by score.

Fix this and add a test that would have caught this bug
benfred added a commit that referenced this pull request Nov 21, 2022
#482 introduced a bug
where the output of the knn models wasn't strictly ordered by score.

Fix this and add a test that would have caught this bug
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.

1 participant