A Song Classifier for Predicting User Preference Based on Spotify Song Attributes
Yong Yang Boon, Siew Mooi Lim, Annebel Yun Ying Choong, Hui Yun Chia · 2023
This study addresses the challenges of predicting user preferences for songs by utilizing machine learning algorithms. Existing research in this area has primarily focused on user-based collaborative filtering or content-based approaches, neglecting the potential of utilizing song attributes for personalized song recommendations. Several algorithms are evaluated in this study, including Random Forest Classifier, Logistic Regression, Gaussian Naive Bayes, Extreme Gradient Boosting, Dummy Classifier, and Stacking Classifier. The Stacking Classifier model was chosen as the best model due to its consistently high accuracy, precision, recall, and F1 score. Spotify API is used in the deployment process to retrieve song attributes, encode them, and input them into the model for prediction. In addition, the model's accuracy is evaluated using two different playlists, with predicted results of songs that the user would like or dislike. Overall, the study suggests that the Stacking Classifier model is suitable for predicting song preferences on Spotify. Furthermore, the deployment process outlined in this study offers a convenient tool for users to predict their preferences for individual songs or playlists. This can empower users to curate their music collections more effectively and help music streaming platforms like Spotify to further improve their recommendation systems.