A Data Science, Exploratory Analysis Project - The goal is to build classification models using: Linear Regression, Decision Tree Classifier & Naive Bayes.
# Spotify Track Popularity Prediction
This project uses machine learning techniques to predict the popularity of Spotify tracks based on various audio features. It also includes exploratory analysis to understand trends in music genres, artists, and other factors influencing track popularity.
You can also find the analysis live on Kaggle which has (at the time of writing) accumulated over 2000+ views and 25 upvotes ✌🏾
---
## Table of Contents
1. Introduction
2. Dataset
3. Project Goals
4. Methods
5. Libraries Used
6. Results
7. Conclusion
---
## Introduction
This project aims to predict the popularity of songs using classification models such as:
- Linear Regression (used for predicting popularity labels)
- Decision Tree Classifier
- Naive Bayes Classifier
### Key Questions Addressed:
- Which genres and artists were most popular from the 1950s to the 2000s?
- How have genre preferences evolved over time?
- What features strongly correlate with a song's popularity?
---
## Dataset
The dataset used is the Spotify Top 2000s Mega Dataset, containing approximately 2,000 tracks spanning from 1956 to 2019. It includes 15 audio features, such as:
- **Beats Per Minute (BPM):** Tempo of the song.
- **Danceability:** How easy it is to dance to the track.
- **Valence:** Positivity of the song's mood.
- **Loudness, Energy, Acousticness, Speechiness, etc.**
Acknowledgements:
- Original data was sourced from PlaylistMachinery (@plamere) and Sort Your Music.
---
## Project Goals
- Predict song popularity based on audio features.
- Explore trends in music features over decades.
- Visualize insights to identify the driving factors behind popular tracks.
---
## Methods
### Exploratory Analysis:
- Visualizing trends using Seaborn and Plotly.
- Identifying correlations between features and popularity.
### Model Training:
- Using `scikit-learn` for building classification models.
- Data preprocessing: Standardization and train-test split.
- Models tested:
- Li …