Lab build

MovieLens recommender evaluation framework

Framework that trains and compares recommender algorithms on MovieLens with accuracy and top-N metrics.

Role
Builder, end to end
Group
MLOps
Services
AI & LLM systems

What it does

A shared evaluation harness built on the Surprise library loads MovieLens ratings, computes popularity ranks and runs every registered algorithm through a train-test split and leave-one-out cross-validation. Algorithms range from random and SVD baselines through content-based KNN on genres and years to a TensorFlow RBM, AutoRec and a weighted hybrid of RBM and content KNN. Spark ALS scripts extend matrix factorisation to the 20-million-rating MovieLens set.

What was built

  1. 01

    Evaluator reports RMSE, MAE, hit rate, cumulative and rating hit rate, ARHR, coverage, diversity and novelty.

  2. 02

    Leave-one-out split builds top-10 lists per user; KNNBaseline similarities feed the diversity metric.

  3. 03

    Content KNN scores movie similarity as genre similarity multiplied by release-year similarity.

  4. 04

    HybridAlgorithm averages RBM and content KNN estimates with configurable weights, 0.5 each in the test run.

  5. 05

    Spark ALS trains on an 80/20 split of 20M ratings, reports RMSE and generates top-10 recommendations per user.

The pipeline, layer by layer

Five layers, one pipeline.

  1. L1Data

    • MovieLens ratings
    • Popularity ranks
  2. L2Splits

    • Train-test split
    • Leave-one-out
  3. L3Algorithms

    • SVD and KNN
    • Content KNN
    • RBM and AutoRec
    • Weighted hybrid
  4. L4Evaluation

    • Shared metrics evaluator
  5. L5Scale-out

    • Spark ALS on 20M

Stack

  • Python
  • Surprise
  • NumPy
  • TensorFlow
  • Apache Spark
  • PySpark MLlib
  • MovieLens

Next lab build · 27 / 46

Airflow ETL for NASA APOD into Postgres

Daily Airflow DAG that pulls NASA's Astronomy Picture of the Day and loads it into Postgres.

Previous: Wine quality modular ML pipeline

Need a system like this in production? Tell us about it.