Home Dataset Methods and Results Analysis

Genre Prediction

Remy Afong, Rachel Anderson, Corinne Burger, Kylie Chesner

About the Project

Throughout the world, music is viewed as an artform for creative expression. Combining elements such as pitch, rhythm, and tempo, music captures feelings and emotions that everyone can relate to. Because music is seen as so creative, we wanted to examine how predictable it can actually be.
Our project aims to predict the genre of a song given various metadata attributes. We have narrowed our scope to Western English music, and we believe that our project has the potential to be used in a variety of applications. For example, it could be used to fill in missing genre data for people who upload songs to iTunes or other music services without genre tags. It could also be used to curate playlists for radios and other services based on genre or mood.
Want to try it out yourself? Click here to see if our classifier can predict the genre for a song of your choice!
graph

In the training graph above, we compared the accuracy of our model against the dataset size. We can see that as the dataset size increased, the training accuracy also increased and began to plateau.

Summary of Results

We experimented with ZeroR, k nearest neighbor, decision tree (J48), random forest, multilayer perceptron, logistic regression, BayesNets, and naive Bayes. As inputs to these algorithms, we used the following attributes in our classification task: danceability, energy, key, loudness, mode, speechiness, acousticness, instrumentalness, liveness, valence, tempo, duration, timbre, and pitch.
We ultimately found that random forests yielded the best results with a 10-fold cross-validation accuracy of 73.5%. Random forests are an ensemble learning method that involves constructing a number of individual decision trees and averaging their results. They implicitly determine which features are important and generalize well to new data, thus proving to be an effective classifier for our task. We found key, mode and energy to be the most important attributes in determining classification.

Northwestern University EECS 349