Problem
A web application lets people build shared lists of things to bring to a party, a trip or a club event. Users run out of ideas and default to a bottle of wine. The team holds about 100k such lists with about 100k distinct items and wants to suggest promising items for a list the user is filling right now. There are no ratings, only the fact that an item is on a list or not.
Example from the article: in three simulated lists with only a few items each, the suggestions match the theme of the list and become more specific once the most common items for that type of event are included. The extracted text does not contain the concrete lists.
Solution in brief
Each list plays the role of a user and each item the role of a movie. Find the 100 existing lists most similar to the current one by cosine similarity, weight each of them by its similarity, and suggest the items with the highest weighted sum that the list does not contain yet.
Questions this case answers
- How to recommend the next items for a partially filled set using the sets of other users, when only add/not-add signals exist and no ratings
- How to suggest items for a user's list from other users' lists when there is no rating data?
- How to weight neighbours so that the most similar lists count more than the 100th?
- How to keep rare or personal item names out of suggestions?
Tools and methods
- User-based collaborative filtering — suggests items that appear on similar lists
- Bag-of-words list-by-item matrix — 0/1 representation of each list
- Cosine similarity — measures how close two lists are
- scikit-learn, pandas — similarity and the pivot table in the author's code
Google or a one-time email code. No password.