Principle:Online ml River Online Recommendation
| Knowledge Sources | |
|---|---|
| Domains | Online_Learning, Recommender_Systems |
| Last Updated | 2026-02-08 18:00 GMT |
Overview
Online recommendation systems predict user preferences for items (e.g., ratings, clicks) and update their models incrementally as new user-item interactions arrive. Unlike batch collaborative filtering, which retrains periodically on the full interaction matrix, online methods process each new rating or interaction immediately, making them suitable for real-time personalization.
Theoretical Basis
Baseline Predictors
The simplest collaborative filtering model predicts using global, user, and item biases:
r_hat(u, i) = mu + b_u + b_i
where mu is the global mean rating, b_u is the user bias, and b_i is the item bias. These biases are updated online via SGD on each new observed rating.
Matrix Factorization
Matrix factorization models approximate the user-item rating matrix R as the product of two low-rank matrices:
r_hat(u, i) = p_u^T * q_i
where p_u is the user latent factor vector and q_i is the item latent factor vector, both of dimension k. The factors are learned by minimizing a loss (typically squared error with regularization) via SGD.
FunkMF
The Funk matrix factorization (named after Simon Funk) is the canonical SGD-based approach. For each observed rating, the update rules are:
e = r(u,i) - p_u^T * q_i
p_u <- p_u + eta * (e * q_i - lambda * p_u)
q_i <- q_i + eta * (e * p_u - lambda * q_i)
This naturally operates in an online fashion, processing one rating at a time.
Biased Matrix Factorization
Extends FunkMF by incorporating user and item biases:
r_hat(u, i) = mu + b_u + b_i + p_u^T * q_i
All four components (global mean, user bias, item bias, latent factors) are updated jointly via SGD.
Random Normal Baseline
A stochastic baseline that predicts ratings drawn from a normal distribution fitted to observed ratings. Useful as a lower-bound benchmark.
Challenges in Online Recommendation
- Cold start: New users or items have no history to base predictions on.
- Preference drift: User tastes change over time, requiring the model to weight recent interactions more heavily.
- Implicit feedback: Many real-world systems observe clicks or views rather than explicit ratings.