Project Overview

A machine learning project to predict song loudness based on Spotify audio features and identify the most influential features.

Dataset

  • Source: Spotify
  • Records: 1,000 songs
  • Input features: 11
  • Target: Song loudness (dB)

Technologies

  • Python
  • Pandas
  • Scikit-learn
  • Matplotlib
  • Seaborn
  • Jupyter Notebook

Methodology

  • Data preparation
  • Missing value imputation
  • Feature standardisation
  • Lasso regression
  • Hyperparameter optimisation using GridSearchCV
  • Five-fold cross-validation
  • Model performance evaluation
  • Feature importance analysis

Model Performance

Metric Result
Optimal regularisation parameter (alpha) 0.1
Cross-validation R² 0.7076
Test R² 0.7485
Test RMSE 2.5921 dB

The optimised model explains 74.85% of the variance in song loudness in the unseen test dataset.

Feature Importance

Feature Importance

Standardised feature coefficients for the optimised Lasso regression model.

The three most influential features are energy, instrumentalness and danceability.

GitHub Repository

View Project on GitHub

Updated: