Skip to content

Johan621/spotify-ai-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Spotify AI Platform

Python Scikit-Learn Streamlit Status License

An End-to-End Machine Learning Platform for Music Mood Analysis, Skip Prediction, and Song Recommendation


Live Demo

https://spotify-ai-platform.streamlit.app

πŸ“Œ Project Overview

Spotify AI Platform is a full-stack Machine Learning application that combines:

  • 🎡 Mood-based playlist generation
  • ⏭️ Song skip prediction
  • ❀️ Music recommendation system
  • πŸ“Š Interactive analytics dashboard

The project demonstrates the implementation of:

  • Unsupervised Learning
  • Supervised Learning
  • Recommendation Systems
  • Feature Engineering
  • Interactive Web Applications

πŸš€ Features

🎡 Mood Playlist Generator

Generate playlists using AI-based mood clustering.

Features:

  • Happy
  • Relax
  • Party
  • Workout
  • Focus
  • Sad

⏭️ Skip Prediction

Predict whether users are likely to skip a song.

Algorithm:

  • Random Forest Classifier

Input Features:

  • Popularity
  • Energy
  • Danceability
  • Tempo
  • Acousticness
  • Duration
  • Mood Cluster

❀️ Recommendation Engine

Generate similar song recommendations using:

  • Nearest Neighbors
  • Cosine Similarity

Output:

  • Top 10 similar songs
  • Artist information
  • Genre information
  • Predicted mood

πŸ“Š Analytics Dashboard

Visualize:

  • Genre distributions
  • Mood distributions
  • Dataset statistics
  • Model performance

πŸ—οΈ Project Architecture

Spotify Dataset
        |
        β–Ό
Data Cleaning
        |
        β–Ό
Feature Engineering
        |
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί Mood Clustering
        β”‚                  |
        β”‚                  β–Ό
        β”‚           Playlist Generator
        |
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί Skip Prediction
        β”‚                  |
        β”‚                  β–Ό
        β”‚           Random Forest
        |
        └────────────► Recommendation Engine
                           |
                           β–Ό
                    Nearest Neighbors
                           |
                           β–Ό
                      Streamlit App

🧠 Machine Learning Pipeline

1. Data Preprocessing

  • Missing value handling
  • Duplicate removal
  • Feature engineering
  • Mood generation
  • Skip label generation

2. Mood Clustering

Algorithm:

K-Means Clustering

Features:

  • Danceability
  • Energy
  • Valence
  • Tempo
  • Acousticness
  • Liveness
  • Speechiness
  • Instrumentalness

Performance:

Silhouette Score: 0.20
Clusters: 6

3. Skip Prediction

Algorithm:

Random Forest Classifier

Performance:

Metric Score
Accuracy 99%
ROC AUC 0.999
Precision 99%
Recall 98%

4. Recommendation System

Algorithm:

Nearest Neighbors

Similarity Metric:

Cosine Similarity

Output:

Top 10 recommendations

πŸ“ˆ Feature Importance

Feature Importance
Duration 0.449
Popularity 0.230
Energy 0.138
Danceability 0.066
Acousticness 0.033

πŸ–₯️ Application Screenshots

Dashboard

Dashboard


Mood Playlist Generator

Mood


Skip Prediction

Skip


Recommendation System

Recommendation


πŸ› οΈ Technologies Used

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • Streamlit
  • Plotly
  • Matplotlib
  • Joblib

πŸ“‚ Project Structure

spotify-ai-platform/

β”œβ”€β”€ datasets/
β”œβ”€β”€ models/
β”œβ”€β”€ notebooks/
β”œβ”€β”€ streamlit_app/
β”œβ”€β”€ assets/
β”œβ”€β”€ reports/
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── LICENSE

βš™οΈ Installation

Clone repository:

git clone https://github.com/Johan621/spotify-ai-platform.git

Install dependencies:

pip install -r requirements.txt

Run application:

cd streamlit_app

streamlit run app.py

🎯 Future Improvements

  • Spotify API integration
  • Deep Learning recommendation system
  • User authentication
  • Playlist export
  • Real-time prediction

πŸ‘¨β€πŸ’» Author

Developed an end-to-end Machine Learning project demonstrating:

  • Machine Learning
  • Recommendation Systems
  • Data Science
  • Model Explainability
  • Interactive AI Applications

About

🎡 End-to-End Machine Learning Platform for Mood Playlist Generation, Song Skip Prediction, and Music Recommendation using K-Means, Random Forest, and Nearest Neighbors.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages