jfkirk / tensorrec

A TensorFlow recommendation algorithm and framework in Python.
Apache License 2.0
1.27k stars 222 forks source link

How to exclude user's liked items from the predictions? #148

Open davidjels opened 5 years ago

davidjels commented 5 years ago

I am getting too many of the user's already-liked items in the recommendations. One or two (of ten) would be reasonable but I am getting up to all ten being from the user's already liked items. I have 1,000 items in my input data so there should be enough other items to recommend.

Obviously, just recommending back to users their already favourite items is not of much use to them. I think part of it is down to the fact that I am only using metadata for a content based recommender so the already liked items are obviously the best match (to their own metadata).

Is there an easy way to remove the already liked items from the rankings?

Thanks in advance

mbw314 commented 5 years ago

In my experience, it is completely expected that a well-trained collaborative filtering model will highly recommend the items known to be preferred by a user (one could argue that this is in fact a requirement for any well-trained model).

One common solution is to simply filter out such items before the recommendations are presented to the user. I've seen this implemented in production systems--for example, there could be an API layer between the user and the recommendation system that handles user experience issues such as this.