Skip to content

briannamueller/Creating-Music-Playlists-with-Unsupervised-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Creating Music Playlists with Unsupervised Learning

I have never been one to create music playlsits on Spotify. Most often, I don't want to take the time to create playlists and on the rare occasions I do attempt to make a playlist, I can't decide how I should structure my playlists. Therefore, any song I like ends up in the 'Liked Songs' list with the rest of my 500+ saved songs. I was interested in exploring unsupervised learning methods as a possible solution.

Objective: Use a K-means clustering algorithm to separate my songs into playlists. The goal is create playlists that appear to be logical in terms of song similarity. Use the Spotify API to create Spotify playlists in Python.

1. Obtain saved songs with the Spotify API

2. EDA

3. K-Means clustering

4. Create playlists with the Spotify API


You can find the main steps of the K-Means clustering process below.

The Elbow method was used to select the optimal number of clusters. (Select k where the Within-Cluster-Sum of Squared Errors starts to diminish, or where the curve begins to level out.) A k value of 5 was chosen for this application.


Screen Shot 2020-11-03 at 7 20 58 PM

The number of songs in each cluster


Screen Shot 2020-11-08 at 12 50 04 PM

Visualization the Clusters with a Principle Component Analysis:


Screen Shot 2020-11-08 at 12 49 11 PM

PCA with 3 components


Screen Shot 2020-11-08 at 12 49 36 PM

Comparing the mean values of some features accross clusters


Screen Shot 2020-11-03 at 7 42 52 PM

Creating a playlist for each cluster using the Spotify API.


Screen Shot 2020-11-08 at 12 47 49 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published