ZANE.C

Recommender System

Recommender System

Created on Sep 25, 2025, Last Updated on Sep 27, 2025, By a Developer

Popularity Based


Popularity based recommender system might be the simplest approach for recommending contents. It based on a simple assumption. That people would like the content popular among a lot of other people.

Content Based


Content Based approach requires a lot of hand-engineered feature for both user and content, which usually require at least some level of domain-specific understanding. It based on the assumption that user or content with similar feature will be similar.

Collaborative Filtering


No need for hand-engineered features. No need for domain-specific knowledge.

The model learns from users’ interaction with contents. Given this nature, it may suffer from cold-start problem, meaning the model don’t know what to suggest. And Popularity Based or Content Based Method is used often to solve the cold start problem.

Neighborhood Methods


One way to utilize users’ interaction is using a User-Content Matrix. And calculate similarities between users/contents based on the matrix, and make the prediction based on the similarities between the prediction target and training sample.

There are multiple ways to define similarity between user and user, content and content.

  • Jaccard:
  • Cosine Similarity:
  • Distance-based:
    • Manhattan Distance:
    • Euclidean Distance:
    • Minkowski Distance:

User-Content matrix is usually pretty sparse, meaning a lot of data is NaN, which is usually got replaced with mean data of the specific User across all content.

Matrix Factorization


Another way of utilizing the User-Content Matrix is factorizing the matrix into two or more matrixes. Give a matrix of shape , it can be converted or or even more.

There multiple way to make the conversion:

  • Single Value Decomposition (SVC)
    • It convert to .
    • SVC is a generalization of Eigen Decomposition. Where the original matrix can be non-square-shaped and non-symmetric. Which is somewhat similar to PCA
  • Non-negative Matrix Factorization (NMF)
    • It convert to , and the original matrix should not have negative value.
    • is a hyper-parameter can be tuned.
    • Trained using different type of Loss Functions with gradient descent to derive the result matrixes.
      • L2 Loss
      • L1 Loss
      • KL Loss
      • Itakura-Saito (IS) Loss

© 2024-present Zane Chen. All Rights Reserved.