Back to research
CSE422: Artificial Intelligence · 2023
Song Virality Prediction Using ML
An end-to-end pipeline over 114,002 Spotify tracks that defines 'viral' by clustering and compares five classifiers, and a useful lesson in target leakage.
[ ARC ]
Architecture
01
Preparation
- Median / mode imputation
- IQR outlier capping
- One-hot genres, scaling
02
Label by clustering
- K-Means (k = 3)
- Popularity, danceability, energy
- Top cluster = viral
03
Classifiers
- KNN, decision tree, LogReg
- Random forest, naive Bayes
04
Evaluation
- Accuracy, F1, ROC-AUC
[ KEY ]
Technical highlights
- 01
Built the full pipeline: cleaning, feature engineering, clustering-based labelling, and a five-model comparison.
[ LIM ]
Limits & lessons
- The models scored near 100%, but the label was defined from popularity, danceability, and energy, which were also inputs. That near-perfect score measures target leakage, not virality. The next version should define virality from signals the model can't see.
[ STK ]
Stack
- Python
- scikit-learn
- K-Means
- pandas
- Matplotlib