Results
After identifying that random forest was the best classifier of the ones we investigated, we implemented it in in Python using the Sklearn package to further explore its classification abilities as well as have a savable model to put on our project website. We analyzed how accuracy changed as we increased dataset from 46 to 1,296. The learning curve for accuracy against dataset size is shown below. The plot shows that after about 600 data entries, the accuracy starts to plateau.
Accuracy of our model as the dataset size increases
Understandably, lots of the inaccuracy is due to overlap between similar genres like pop and edm, hip-hop/rap and r&b, etc. These misclassifications can be seen below in the confusion matrix for the random forest classifier. For example, 30 (out of 170) r&b songs were misclassified as hip-hop/rap.
Genre classification confusion matrix
Featuring another artist of a different genre in a song also leads to misclassifications. For instance, a pop song may be classified as hip hop if it features a rap artist who contributes a verse or two.