MARS: one recommender to compare them all
Every streaming service runs its own black-box recommender. For my master’s thesis I built MARS, a Music Analysis Recommendation System designed to work across services and act as a neutral benchmark between them.
01Problem
Spotify, Apple Music, Tidal and the rest each recommend music their own way, and none of them show their work. That makes it hard to judge which service actually recommends better.
MARS is a standard recommender that could run on any service and give listeners an objective way to compare them.
02Data
- Pulled through the Spotify API with Spotipy
- Joined track and artist data on their IDs
- Binned release year; rescaled popularity from 1–100 to 1–10
- Dropped fields that were highly correlated or didn’t matter for recommendations

03Step 1 · Can a model tell what I’ll like?
I ran PyCaret AutoML to compare classifiers on favorited vs. non-favorited tracks. Extra Trees and LightGBM led; I chose LightGBM, which reached an AUC of 0.93.
| MODEL | ACCURACY | AUC | RECALL | PRECISION | F1 |
|---|---|---|---|---|---|
| Extra Trees · compare | 0.8633 | 0.9196 | 0.9061 | 0.8616 | 0.8817 |
| LightGBM · compare | 0.8633 | 0.9261 | 0.8909 | 0.8709 | 0.8799 |
| LightGBM · final | 0.8825 | 0.9332 | 0.9064 | 0.8932 | 0.8998 |
The thesis notes some possible overfitting, which is part of the next round of work.
04Step 2 · Recommend from the whole library
- Weight genres with TF-IDF, so rare genres count for more than common ones.
- Summarize the whole playlist into a single vector, as if it were one song.
- Score every library track by cosine similarity to that vector. Smaller angle, closer match.
05Result
MARS, the classifier and Spotify’s own recommendations surfaced similar songs.
That means the approach holds up as a baseline. Next: connect more services through their APIs, deploy it as a web app, and A/B test which recommendations people actually pick.
06What I learned
MARS pulled together everything from my data science training and two things I love: data and music.
It taught me how to put third-party ML libraries and tools to work, pull data from a live production API, and fit a model into code that runs against a real service.