Notes

User-User CF

The oldest idea in recommendation is also the most human one: find the people whose taste matches yours, then look at what they liked and you have not seen yet.

How a prediction is made
User-user collaborative filtering scores an item for a target user in three steps. Compute a user similarity between the target and every other user from the overlap in their rated items, usually with Pearson correlation or centred cosine similarity. Keep the k-nearest users who have actually rated the item in question. Then predict a weighted average of their ratings, taken as deviations from each neighbour's own mean so a generous rater does not skew it. Nothing is learned in advance — the similarities and the neighbourhood are the model.

What it needs to work
It needs overlap. Two users with no items in common have an undefined similarity, and on a sparse matrix most pairs are in that position; significance weighting discounts similarities computed from only two or three shared items, which would otherwise come out at a perfect 1.0. A user with no ratings gets no neighbours at all.

Why item-item displaced it
User taste shifts and the user base churns, so user similarities go stale quickly and must be recomputed as the population grows. Item-item similarities are far more stable, and there are usually fewer items than users — which is why Amazon moved to item-item CF and why user-user survives mainly as the teaching case and a baseline in Surprise or LensKit.

User-user collaborative filtering predicts a user's interest in an item by finding the users most similar to them — similarity measured from overlapping ratings — and taking a weighted average of those neighbours' ratings for that item, adjusted for each neighbour's rating bias. It is the original memory-based recommender: nothing is trained in advance. Sparse overlap and churning user taste make its similarities fragile, which is why item-item CF largely replaced it in production.

You have a friend whose taste in films keeps turning out to match yours. When they rave about something you have not seen, you take it seriously — more seriously than a stranger's opinion.

User-user collaborative filtering is software doing exactly that at scale. It compares your ratings with everyone else's, picks out the handful of people who have agreed with you most, and recommends what they liked and you have not tried. Nobody has to describe the films themselves. The only thing the system knows is who liked what — and that turns out to be enough.