Collaborative filtering recommends items based on user-item interaction patterns.

Core idea: users who agreed in the past may agree in the future.

User-Based Collaborative Filtering

User-based collaborative filtering finds users similar to the target user, then recommends items those similar users liked.

Steps:

  1. Find users similar to the target user.
  2. Identify items those users liked.
  3. Recommend items the target user has not seen.

Example: “Users like you also bought…”

Item-Based Collaborative Filtering

Item-based collaborative filtering finds items similar to the user’s liked items.

Steps:

  1. Calculate similarity between items.
  2. For items the user liked, find similar items.
  3. Recommend similar unseen items.

Example: “Customers who bought this also bought…”

Similarity Metrics

Collaborative filtering often uses Distance Metrics And Similarity Measures such as cosine similarity, Pearson correlation, or Jaccard similarity.

Advantages

  • can discover unexpected items
  • does not require hand-crafted item features
  • improves with more interaction data

Disadvantages

  • suffers from cold start
  • sparse user-item matrices are hard to learn from
  • popular items can dominate
  • explanations can be less direct than content-based methods

Matrix Factorization is a common model-based form of collaborative filtering.