benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.57k stars 612 forks source link

Can we do recommend without using user_items matrix ? #642

Closed gdg456 closed 1 year ago

gdg456 commented 1 year ago

This is not an issue as such but a query. I am using implicit for my production and i want to save the model after being trained. Then another job loads the model and want to calculate recommendations for selected users. Can I do it without using user-items interaction matrix ?

benfred commented 1 year ago

It depends a bit on the model - the ALS/BPR models only require the user-item interaction if you are either filtering already liked items, or are recalculating the user embedding. For these models, if you pass recalculate_user=False and filter_already_liked_items=False, you can set the user_items parameter to None.

The KNN models require this to be passed all the time.