# MovieLens (1998)

> Millions of 0.5–5 star movie ratings from the MovieLens site, the classic recommender dataset.

Page: https://mralbu.github.io/ai-datasets/d/movielens

## Key facts

- Category: Tabular
- Task: Recommendation (predict how a user rates a movie)
- Creators: GroupLens Research (University of Minnesota)
- Size: Versions from 100k to 32M ratings; the copy sampled here has ~1M
- Splits: train 891,382, validation 99,043
- Input: User id, movie id (with title and genres)
- Labels: Rating, 0.5–5 stars
- License: GroupLens research license (non-commercial use)
- Paper: [The MovieLens Datasets: History and Context](https://doi.org/10.1145/2827872)
- Homepage: https://grouplens.org/datasets/movielens/
- Hugging Face: [ashraq/movielens_ratings](https://huggingface.co/datasets/ashraq/movielens_ratings)
- Sampled at Hub revision a1c7c3304f31f9be882a2c90726d25b94dd2d8f1 (2026-11-07)

## Why it matters

For two decades, the default dataset for recommender systems. Each row is one (user, movie, rating) triple, so the data is a huge, mostly empty matrix. The task is to fill in the gaps: collaborative filtering, matrix factorization, then neural recommenders. The ratings come from a real research site that people used to get movie suggestions, which made it realistic and, unlike commercial data, freely shareable.

## Worth knowing

- The matrix is very sparse. MovieLens 25M has 25 million ratings from 162k users on 62k movies, so about 0.25% of the cells are filled.
- Every user in the standard releases rated at least 20 movies; less active users were left out.
- Main releases: 100K (1998), 1M (2003), 10M (2009), 20M (2015), 25M (2019), 32M (2024). 100K and 1M use whole stars; half-star ratings appear from 10M on.
- The Netflix Prize (2006–2009) used much bigger proprietary data, but MovieLens is what most papers can actually share and reproduce.

## Get the data

This is a community copy of about 1M ratings with titles and poster links. The official releases (100K to 32M) are zip files on the GroupLens site.

```bash
# pip install -U huggingface_hub
hf download ashraq/movielens_ratings --repo-type dataset \
  --local-dir movielens
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("ashraq/movielens_ratings")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/ashraq/movielens_ratings@~parquet/default/validation/*.parquet")
print(df.shape)
```

## Related datasets

- [Netflix Prize](https://en.wikipedia.org/wiki/Netflix_Prize): 2006, 100M ratings and a $1M prize
- [MovieLens 100K](https://huggingface.co/datasets/DukeNLPGroup/movielens-100k): 1998, the original release, with user demographics

## Landmark papers

- [Item-Based Collaborative Filtering Recommendation Algorithms](https://doi.org/10.1145/371920.372071) (2001)
- [Matrix Factorization Techniques for Recommender Systems](https://doi.org/10.1109/MC.2009.263) (2009)
- [Neural Collaborative Filtering](https://arxiv.org/abs/1708.05031) (2017)

## Papers on this site that use it

- [Item-based collaborative filtering (2001)](https://mralbu.github.io/ai-datasets/p/item-based-cf.md): Recommend by how similar items are, not users, which is both more accurate and much easier to scale.
