top of page

Effectiveness of Machine Learning in Song Genre Classification

EECS-349 Machine Learning - Northwestern University

Course Project conducted by Connor Moen, Jordan Moore, and Vishal Giridhar. For a summary, see the abstract below; for a more detailed report, click here.

Home: Welcome

Abstract

Our task is to determine the genre of a song based on attributes of the given song. This task is important because people often don’t know the precise genre of a song they are listening to. This will allow the listener to learn more about the music they listen to as well as push them in a direction of finding more songs within the outputted genre. While the task is currently that of predicting the genre of a song, this could directly contribute to suggesting songs based on a group of other songs, perhaps a song recommendation algorithm based on a certain playlist of a user. When people know the genre of their song they are more likely to be able to connect to other people who listen to similar music. This connection is another reason as to why this task is important as it is often lacking in today’s society. We utilized a 10,000 song subset of the million song dataset we found online. The dataset contains 35 attributes for each example. For the purpose of our task we eliminated down to 12 nominal attributes that we found to be consistent, useful, and helpful in relation to determining the genre. Our initial hypothesis was that Decision Trees and Nearest Neighbor would be the best approaches. We tested all of our learners on Weka with 10-fold Cross Validation. We first tested our data on ZeroR to provide a baseline and then proceeded to test on J48 Decision Tree and RandomTree for Decision Trees as well as IBK 1NN, 2NN and 3NN to test nearest neighbor.

​

        In these initial tests ZeroR returned an accuracy of 3.5679 %, J48 returned 76.2143 %, RandomTree returned 60.209 %, IBK-1NN returned 50.9392 %, IBK-2NN returned 38.7456 %, and IBK-3NN returned 34.6231 %. From these preliminary results it is evident that Decision Trees perform far better on our data set than Nearest Neighbor and we were shocked to see Nearest Neighbor perform poorly and get worse when increasing k. We attempted tweaks on the J48 Decision Tree learner itself and all attempts lessened the accuracy or did nothing at all. Due to our large dataset and set of 18 attributes the decision tree formed from the learner was too large to print so it was difficult to determine the most important attributes. We achieved an optimal training accuracy of 76.3006% and test accuracy of 83% with the J48 Decision Tree after melding genres to consolidate the number of outputs.

garph.png
Home: About the Project

The Data

The Million Song Dataset

We used the aptly named Million Song Dataset, an enormous collection of one million songs and their associated features (tempo, genre, key, etc). The full dataset is ridiculously large - some 280 GB - so we only used a 1.8 GB subset of 10,000 songs. You can find the full dataset here.

Home: Body

Get in Touch

Thanks for submitting!

Teenage Students Raising Hands
Home: Contact
bottom of page