This repository is for the source code of Mixerify, a machine learning model which analyzes a playlist of your choice and returns a 50 song playlist from the top new songs of the last two years among all relevant genres using Spotify. The playlist is generated based on your taste/ input playlist.
CLICK HERE TO GENERATE A PLAYLIST :)
Here is a demo of how the website works:
The algorithms used to create the song recommendation system are:
- K Means Clustering
- K Nearest Neighbors
The model uses K Means to create ratio of songs with similar Means of features and KNN to find the nearest song in each cluster from a big dataset of new songs of all the genres. This process is done using ratios of song in each cluster and the recommended playlist includes 50 songs.
Spotify’s API called Spotipy, allows you to search for features of a song.
We initially created an API for our model to iterate through the entered playlist of the user and extract the IDs of all the songs. Then, we created functions to receive the 13 features of every single song that the API allows us to have. Finally, we used the machine learning algorithms to analyze the user data and create a final dataset namely the final playlist.
The machine learning process was mainly using the Scikit-learn functions and plotting the results using Seaborn and Plotly. An instance of a graph generated from the main dataset of songs that we recommend songs from can be seen below:
Used KMeans model and plotly to generate the plot.
To choose the final songs, we used KNN model from Scikit-learn to iterate through all user songs and find the nearest neighbors to each song from each cluster. After comparing the distances, the final dataset/playlist is generated.
The front end is built in React.js and styled with Tailwind. We take advantage of several React libraries including spotify-web-api-js for Spotify API calls and Axios for REST calls. The backend handles authentication using Spotify OAuth and uses Express.js to set up REST endpoints to run the machine learning Python scripts.
-
For the development progress check: MIXERIFY_PROGRESS and MIXERIFY_TEST
-
For our data cleaning and analysis API which uses Spotipy you can refer to: MIXERIFY_API
-
For Backend and Frontend sourcecode: MIXERIFY_WEB
Shahrad: Data Cleaning, Machine learning developer and testing
Emma: Data Cleaning, Machine learning developer and testing
Hanna: Data Cleaning, Machine Learning developer and testing
Tristan: Full Stack Web Development and testing