Linear algebra · 2026
Sparse SVD Recommender
From a few movie ratings to a recommendation, with each matrix operation visible along the way.
An unrated movie is not a zero-star movie
The example starts with ten users and sixteen movies. Only observed ratings contribute to each movie’s average. Known ratings become residuals around that baseline; a missing entry means no observed deviation, rather than a negative review.
- Sparse input
- Keep the known user–movie ratings as a coordinate list.
- Movie baseline
- Compute the average rating from the available observations.
- Residuals
- Represent how each observed rating differs from its movie’s baseline.
Follow the factorization
- Choose a rankExplore one to six latent components and inspect the singular values.
- ReconstructCombine the factors to estimate missing ratings.
- RecommendRank the movies the selected user has not rated.
The explanation runs in the browser
Interactive calculation
Edit the “You” ratings, change the retained rank, and follow the factors through a dot-product prediction. The static demo needs no Python server.
Python reference
A separate NumPy, SciPy and scikit-learn example expresses the same approach with a sparse residual matrix and truncated SVD.
A model you can inspect
The small table makes matrix reconstruction understandable. Its recommendations illustrate the method rather than establish recommendation quality on a real catalog or unseen users.