Spotify music classifier
This project dates back to 2020, during the early days of the pandemic. At the time, I was teaching an online data science course and wanted a fun, relatable way to explain supervised learning to students stuck behind their screens.
To bring the concept to life, I used the Spotify API to download song features from two playlists: one curated by me, and one by my wife. Then I trained a simple neural network to classify whether a given track was more likely to be in my playlist or hers.
This example served as a playful but effective way to walk through:
- Supervised learning concepts (classification, train/test split, overfitting)
- Neural network architecture and training with TensorFlow
- t-SNE visualizations to explain embeddings and clustering
It was a lighthearted, accessible project that really clicked with students β and made machine learning feel more personal.
More details in the GitHub repo.
π§© Features
- π§ Uses Spotify API to pull playlist song features (tempo, danceability, valence, etc.)
- π§ Simple neural network using TensorFlow/Keras for binary classification
- π Interactive t-SNE visualization of learned embeddings
- π§ͺ Modular code for teaching purposes and classroom demos
π‘ Technologies used
- TensorFlow / Keras β Neural network modeling
- t-SNE β Dimensionality reduction for embedding visualization
- Docker β Reproducible environment for running the app
- Python β Core logic and data wrangling
- Streamlit β Interactive UI for visualizing classification and embeddings
π Resources
π Github repo