What is collaborative filtering, and how do user-based and item-based neighbourhood methods differ? Which one scales better when there are far more users than items, and why?

Unsupervised learning, Recommender systems
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you can explain the idea of predicting ratings from other people's behaviour, and the practical trade-off between the two neighbourhood variants.

Key idea

Collaborative filtering predicts a missing rating from the ratings matrix alone; user-based methods average similar users' ratings, item-based methods average the active user's ratings of similar items.

Steps

  1. Start from a ratings matrix with users as rows and items as columns. Most entries are missing, and we want to fill them in using only the observed ratings, without item descriptions.
  2. User-based: find users whose past ratings look like the active user's (for example by cosine similarity or Pearson correlation), then predict the rating as a similarity-weighted average of their ratings for the item.
  3. Item-based: find items that were rated similarly by the same users as the target item, then predict the rating as a weighted average of the active user's own ratings of those similar items.
  4. Compare scaling and explanations: with many more users than items, the item–item similarity table is much smaller and changes slowly so it can be precomputed offline, whereas user-based methods must search across millions of users. Item-based methods also give simpler explanations ('because you liked X').
  5. Both struggle with the cold-start problem (new users or items have no ratings) and sparsity, which motivates matrix factorisation.

Common mistakes

How long your answer should be

4–6 sentences.

Read this

Previous in Unsupervised learning: What is an undercomplete autoencoder, and why does it need a bottleneck narrower than the input to learn anything useful?
Next in Unsupervised learning: Does k-means always converge, and does it find the global optimum?