<!-- Generated by scripts/sync-agent-content.mjs. Edit the shared public sources, then regenerate. -->
# Sparse SVD Recommender

Explore movie recommendations through matrix reconstruction.

- Dates: 2026
- Status: Interactive demonstration
- Areas: Software engineering; AI / ML
- Stack: JavaScript · Linear algebra · Python reference
- Topics: JavaScript; Python; Machine Learning; Algorithms; Interfaces
- Public case study: https://mgiorgetti.com/project_details/project-matrices.html

## Problem

A recommendation example should show how sparse ratings and missing observations become reconstructed estimates, rather than hiding the matrix operations.

## Contribution

Matrices course project with a JavaScript browser demonstration and a Python reference for sparse residuals and truncated singular value decomposition.

## Technical approach and public case study

From a few movie ratings to a recommendation, with each matrix operation visible along the way.

- Matrices course project

- JavaScript browser demo

- Python reference

### 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 rank Explore one to six latent components and inspect the singular values.

- Reconstruct Combine the factors to estimate missing ratings.

- Recommend Rank 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.

## Results and limitations

The inspectable example uses ten users and sixteen movies, with one to six retained components. It illustrates matrix reconstruction and does not establish recommendation quality on a real catalog or unseen users.

## Public supporting links

- [Portfolio case study](https://mgiorgetti.com/project_details/project-matrices.html)
- [Open the demo](https://inventure72.github.io/MatricesProject/)
- [View source](https://github.com/Inventure72/MatricesProject)
- [Matteo Giorgetti profile](https://mgiorgetti.com/profile.md)
