A data science project exploring the factors associated with Spotify track popularity through exploratory data analysis, clustering, regression modeling, and cross-validation.
This project treats Spotify track popularity as a regression problem, with the goal of predicting track_popularity using musical and playlist-related features.
The analysis includes exploratory data analysis, feature relationships, unsupervised clustering, multiple regression formulations, model evaluation, and cross-validation.
- Data cleaning and duplicate handling
- Exploratory data analysis (EDA)
- Visualization of categorical and continuous variables
- Correlation analysis
- Principal Component Analysis (PCA)
- K-Means clustering
- Hierarchical clustering
- Multiple linear regression models
- Model comparison using R² and RMSE
- 5-fold cross-validation
Features including energy, valence, danceability, and playlist genre showed relationships with track popularity.
Eight regression formulations were evaluated. While Model 3 performed best on the training data, Model 7 achieved the strongest cross-validation performance with a mean RMSE of approximately 22.32.
The results demonstrate the importance of evaluating both training performance and generalization to unseen data.
- Python
- pandas
- NumPy
- Matplotlib
- Seaborn
- scikit-learn
- statsmodels
- SciPy
- Patsy
- Jupyter Notebook
Spotify_Data_Analysis.ipynb— complete analysis and modeling workflow
- Python programming
- Exploratory data analysis
- Statistical modeling
- Regression analysis
- Unsupervised learning
- Model validation
- Data visualization
- Quantitative interpretation
Elzanne Naudé
M.S. Data Science Candidate, University of Pittsburgh