← Lessons

quiz vs the machine

Silver1120

Machine Learning

Collaborative Filtering User Based

Find users who behaved like you and recommend what they liked.

4 min read · intro · beat Silver to climb

The intuition

User based collaborative filtering assumes that people who agreed in the past will agree in the future. To recommend for you, it finds a neighborhood of users with similar taste, then suggests items they liked that you have not seen.

The steps

  • Represent each user as a row of ratings or interactions over items.
  • Compute similarity between users, often cosine or Pearson correlation on the items they both rated.
  • Pick the most similar k neighbors.
  • Predict your score for an item as a weighted average of neighbor ratings, weighted by similarity.

What makes it work

It uses no item attributes at all. The signal comes entirely from the pattern of agreement across the crowd, so it can surface surprising cross genre picks that content methods miss.

The catch

  • The user user similarity step scales poorly as users grow into the millions.
  • It struggles with sparsity: two users may share almost no rated items.
  • A brand new user has no neighbors yet, the cold start problem.

Key idea

User based collaborative filtering predicts your preferences from a neighborhood of similar users, capturing crowd patterns but scaling and sparsity hurt it.

Check yourself

Answer to earn rating on the learn ladder.

1. How does user based collaborative filtering make a prediction?

2. What is a major scaling problem for user based methods?