lightfm icon indicating copy to clipboard operation
lightfm copied to clipboard

Deleting user or product from a pretrained model

Open sgaseretto opened this issue 5 years ago • 2 comments

How can this be done with LightFM? Imagine you have a very good model already trained, and you discontinue a large group of products, and also some of your users deleted their accounts. How can this user and items representations be deleted from the model in order to avoid having to train a new model without them?

sgaseretto avatar Sep 27 '20 16:09 sgaseretto

@sgaseretto Have you found an answer ? I'm facing the same issue

johannbuscail avatar Oct 19 '20 15:10 johannbuscail

Within predict, you pass in the item ids that you want included to get predictions for. I would suggest creating a function that returns only item ids that are still in the system, and using this to filter which items you get prediction for. For example: predictions = predict(user_ids=1, item_ids=items_in_system_right_now())

lkurlandski avatar Nov 05 '20 19:11 lkurlandski