Notes

Neighborhood Method

The oldest working idea in recommendation is also the simplest: find the rows or columns of the interaction matrix that look most like the one you care about, and let them vote. A neighborhood method is any recommender built on that move.

The two directions
A user-based neighborhood finds the k users whose histories most resemble the target user’s — cosine or Pearson similarity over the matrix rows — and predicts from what those neighbours engaged with. An item-based neighborhood works down the columns instead: the items most similar to ones the user already liked. Item-based variants dominate production, because item-item similarities are stable enough to precompute nightly while user-user similarities shift with every new event.

What it gets right
There is no training loop and no latent dimension to tune, so a new interaction counts immediately. The recommendation also explains itself — “because you watched X” is literally the neighbour that produced it. Amazon’s item-to-item collaborative filtering made this the default for catalogue retail, and it survives inside neural pipelines as a candidate-generation source.

Where it fails
Sparsity is the hard limit. Two users with compatible taste and no items in common have zero similarity, so the method sees nothing — the gap latent-factor models were introduced to close. Popular items also crowd the neighbour sets, pulling recommendations towards the head of the catalogue, and a similarity computed from three co-ratings is noise unless damped by significance weighting.

A neighborhood method predicts from similarity: it locates the users or items most like the target in the interaction matrix and lets their recorded behaviour decide the recommendation. Item-based versions serve production systems, because item-item similarities precompute cleanly and the result explains itself. There is no training step, so new interactions count at once — but two users with no overlapping items register as unrelated however compatible their taste.

Ask a few people who buy the same books you do what they read next, and you have a decent reading list. That is the whole idea.

A neighborhood method is software looking for your nearest matches — either people whose choices resemble yours, or items picked up by the same crowd as the thing you just liked — and suggesting what those matches point to. It is why “customers who bought this also bought” has survived decades of fancier methods: it needs no training, it reacts to what you did a minute ago, and it can always tell you which item it copied the idea from.