-
Notifications
You must be signed in to change notification settings - Fork 611
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
Recommend from liked #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I like the idea behind letting you train to train new user factors on the fly: I know how valuable this can be for real world implementations.
I'm wondering if we can clean up the API you suggest a little though.
In this PR, you're passing a list of liked item ids and a single confidence value. This will work for binary feedback cases, but breaks down for the last.fm example where we will want to include per item how confident we are that the user liked it.
In the existing code, the 'recommend' method takes a sparse matrix of user/item/confidence values already, which contains the liked items for the user. I'm wondering if we can leverage this API, and just add a 'recalculate_user' parameter to indicate that we should recalculate the user factors from the passed in like_items?
Sure, I will do that!
…On Tue, Jun 20, 2017, 6:38 PM Ben Frederickson ***@***.***> wrote:
***@***.**** commented on this pull request.
Thanks for the PR!
I like the idea behind letting you train to train new user factors on the
fly: I know how valuable this can be for real world implementations.
I'm wondering if we can clean up the API you suggest a little though.
In this PR, you're passing a list of liked item ids and a single
confidence value. This will work for binary feedback cases, but breaks down
for the last.fm example where we will want to include per item how
confident we are that the user liked it.
In the existing code, the 'recommend' method takes a sparse matrix of
user/item/confidence values already, which contains the liked items for the
user. I'm wondering if we can leverage this API, and just add a
'recalculate_user' parameter to indicate that we should recalculate the
user factors from the passed in like_items?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#35 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAR3aOcamjBpiQaHW3gAuZ33btkJYOInks5sGEn9gaJpZM4N-1r6>
.
|
@benfred I believe the implementation is much cleaner now. I've also managed to reuse the non native code to compute user factors. Please let me know what do you think about it now. |
looks good to me! thanks for this |
Is it possible to share a reference/paper on how/why the |
Hi Benfred,
Thanks so much for this library!
I'm not sure if you are aware, but it's a standard practice to sample users to get item factors and then use those vectors to generate recommendations for all users.
The trick is to cache item factors only and compute user vectors on the fly to generate recommendations. Another advantage of this approach is that we can recompute user recommendations as soon as we have more data, without needing to rebuild the whole model.
This is a rough implementation of the idea. It introduces the
recommend_from_liked
method that accepts a list of items that were consumed by the user.I did not reuse the code that computes the user vector in the iterations loop. With some refactoring, I think we could reuse the "solver", adding native and cg support. I can do that myself if you think this feature is helpful.
Any thoughts?