MovieLens recommender evaluation framework
Framework that trains and compares recommender algorithms on MovieLens with accuracy and top-N metrics.
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
- 01
Evaluator reports RMSE, MAE, hit rate, cumulative and rating hit rate, ARHR, coverage, diversity and novelty.
- 02
Leave-one-out split builds top-10 lists per user; KNNBaseline similarities feed the diversity metric.
- 03
Content KNN scores movie similarity as genre similarity multiplied by release-year similarity.
- 04
HybridAlgorithm averages RBM and content KNN estimates with configurable weights, 0.5 each in the test run.
- 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.
L1Data
- MovieLens ratings
- Popularity ranks
L2Splits
- Train-test split
- Leave-one-out
L3Algorithms
- SVD and KNN
- Content KNN
- RBM and AutoRec
- Weighted hybrid
L4Evaluation
- Shared metrics evaluator
L5Scale-out
- Spark ALS on 20M