You are not alone in your tastes. Somewhere out there is a 'Neighbor' who shares your unique preferences. This algorithm finds them for you.
1The Social Interaction Matrix
User-User Collaborative Filtering starts with a massive table where every row is a user and every column is an item. The values represent ratings (1-5) or binary interactions (0 or 1). Because most users only interact with a tiny fraction of the total catalog, this is a Sparse Matrix. The goal of the algorithm is to 'Fill in the blanks'—predicting what the empty cells would be if the user were to interact with those items.
2Finding Your Neighbors
To make a recommendation for a 'Target User', we calculate their similarity to every other user in the database using formulas like Pearson Correlation or Cosine Similarity. We then select the top K-Nearest Neighbors. The predicted rating for an item is the weighted average of the ratings given by these neighbors. If 10 people who like exactly what you like all gave 'Inception' 5 stars, the system will assume you will too.
3The Cost of Popularity
While User-User filtering is intuitive, it hits a Scalability Wall. As you add more users, the number of comparisons grows quadratically (N^2). Calculating similarities for 10 million users in real-time is impossible for most servers. Furthermore, users change their tastes over time, meaning the similarity matrix needs constant recalculation. This is why many large-scale platforms have shifted toward Item-Item Filtering or Matrix Factorization for their production systems.
