Spotify Recommendation Algorithm

Spotify Recommendation Algorithm

- 1 min

Music is an important component of our daily lives. We dance, sing, enjoy, and cry simply because of music. But what music is right for any given moment? Spotify tries to use song and playlist data to predict this.

In this research, I provide a preliminary model for predicting the next best song for a music playlist on Spotify. See the GitHub repo here.

The process I guide you through in this article consists of numerous steps. Firstly, we collect 1000 Spotify playlists to predict the genre of. Then, we we select 5000 songs from the top 10 genres on Spotify. By knowing the metafeatures (such as “key”, “acousticness”, and “danceability”) of these songs and calculating the metafeatures of the playlists, wecan predict, using these as independent variables in supervised machine learning, the genre of the playlists under examination. From there, we can use a gaussian mixture model to place a variety of songs under each genre in a high dimensional space. Thereafter, if we query where that playlist (relative to its metafeatures) is in the high dimensional space, we can recommend the songs closest in Euclidean distance within that genre to the user.

In conclusion, I realise that there are a few fundamental flaws with my approach, however, the results are somewhat promising and provide unique insight into a variety of machine learning and Bayesian methods for predictive inference.

Alexander Bricken

Alexander Bricken

Travelling the world.

virtual resume facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora quora personal page