Skip to main content

Abstract

The article presents the possibility of classifying music tracks according to their musical genre. This issue is interesting because it is difficult to find solutions that look for similarity between songs based on their waveforms, as in this work. This article shows that such a classification is possible. For this process, the KNN classifier was used, for which it is possible to apply different metrics (metric spaces). The article shows the validity of testing different distance measures in the classification process. The analysis of music tracks and assignment to the appropriate genre is carried out, on the basis of attributes describing the music track. These attributes are obtained using the jAudio library. The development of further research in this area may allow finding other suitable music not only on the basis of historical data about the user (what he was listening to along with the music track) but also directly on the basis of the genre of the given song.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Agrawal, R., Imielinski, T., Swami, A.: Database mining: a performance perspective. IEEE Trans. Knowl. Data Eng. 5(6), 914–925 (1993)

    Article  Google Scholar 

  2. Aha, D.W., Kibler, D., Albert, M.K.: Instance-based learning algorithms. Mach. Learn. 6(1), 37–66 (1991)

    Google Scholar 

  3. Aksoy, S., Haralick, R.M.: Feature normalization and likelihood-based similarity measures for image retrieval. Pattern Recognit. Lett. 22(5), 563–582 (2001)

    Article  Google Scholar 

  4. Bach, M., Werner, A.: Cost-Sensitive Feature Selection for Class Imbalance Problem. In: Borzemski, L., Świątek, J., Wilimowska, Z. (eds.) ISAT 2017. AISC, vol. 655, pp. 182–194. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-67220-5_17

    Chapter  Google Scholar 

  5. Bach, M., Werner, A., Żywiec, J., Pluskiewicz, W.: The study of under-and over-sampling methods utility in analysis of highly imbalanced data on osteoporosis. Inf. Sci. 384, 174–190 (2017)

    Article  Google Scholar 

  6. Basili, R., Serafini, A., Stellato, A.: Classification of musical genre: a machine learning approach. In: ISMIR (2004)

    Google Scholar 

  7. Ben-David, A.: Comparison of classification accuracy using Cohens Weighted Kappa. Exp. Syst. Appl. 34(2), 825–832 (2008)

    Article  Google Scholar 

  8. Costa, E., Lorena, A., Carvalho, A., Freitas, A.: A review of performance evaluation measures for hierarchical classifiers. In: Evaluation Methods for Machine Learning II: Papers from the AAAI-2007 Workshop, pp. 1–6 (2007)

    Google Scholar 

  9. Hamel, P., Eck, D.: Learning features from music audio with deep belief networks. In: ISMIR, vol. 10, Utrecht, The Netherlands, pp. 339–344 (2010)

    Google Scholar 

  10. Henaff, M., Jarrett, K., Kavukcuoglu, K., LeCun, Y.: Unsupervised learning of sparse features for scalable audio classification. In: ISMIR, vol. 11. Citeseer (2011)

    Google Scholar 

  11. jAudio documentation. http://jaudio.sourceforge.net/index.html

  12. Kostrzewa, D., Brzeski, R.: Adjusting parameters of the classifiers in multiclass classification. In: Kozielski, S., Mrozek, D., Kasprowski, P., Małysiak-Mrozek, B., Kostrzewa, D. (eds.) BDAS 2017. CCIS, vol. 716, pp. 89–101. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-58274-0_8

    Chapter  Google Scholar 

  13. Kostrzewa, D., Brzeski, R.: The data dimensionality reduction in the classification process through greedy backward feature elimination. In: Gruca, A., Czachórski, T., Harezlak, K., Kozielski, S., Piotrowska, A. (eds.) ICMMI 2017. AISC, vol. 659, pp. 397–407. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-67792-7_39

    Chapter  Google Scholar 

  14. Kostrzewa, D., Brzeski, R.: Parametric optimization of the selected classifiers in binary classification. In: Król, D., Nguyen, N.T., Shirai, K. (eds.) ACIIDS 2017. SCI, vol. 710, pp. 59–69. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-56660-3_6

    Chapter  Google Scholar 

  15. Kubanski, M.: Znajdowanie utworow podobnych metoda najblizszego sasiada (in polish): bachelor thesis. SUT, Gliwice, Poland (2018)

    Google Scholar 

  16. Lee, C.H., Shih, J.L., Yu, K.M., Su, J.M.: Automatic music genre classification using modulation spectral contrast feature. In: 2007 IEEE International Conference on Multimedia and Expo, pp. 204–207. IEEE (2007)

    Google Scholar 

  17. Li, M., Sleep, R.: Genre classification via an LZ78-based string kernel. In: ISMIR, pp. 252–259 (2005)

    Google Scholar 

  18. Liu, H., Motoda, H.: Feature Selection for Knowledge Discovery and Data Mining, vol. 454. Springer, New York (2012). https://doi.org/10.1007/978-1-4615-5689-3

  19. McEnnis, D., McKay, C., Fujinaga, I.: Overview of on-demand metadata extraction network (OMEN). In: Proceedings of the Seventh International Conference on Music Information Retrieval (ISMIR 2006) (2006)

    Google Scholar 

  20. McEnnis, D., McKay, C., Fujinaga, I., Depalle, P.: jAudio: Additions and improvements. In: ISMIR, pp. 385–386 (2006)

    Google Scholar 

  21. McKay, C., Fujinaga, I., Depalle, P.: jAudio: a feature extraction library. In: Proceedings of the International Conference on Music Information Retrieval, pp. 600–603 (2005)

    Google Scholar 

  22. Mehra, N., Gupta, S.: Survey on multiclass classification methods (2013)

    Google Scholar 

  23. Pampalk, E., Flexer, A., Widmer, G., et al.: Improvements of audio-based music similarity and genre classificaton. In: ISMIR, vol. 5, London, UK, pp. 634–637 (2005)

    Google Scholar 

  24. Powers, D.M.: Evaluation: from precision, recall and F-measure to roc, informedness, markedness and correlation (2011)

    Google Scholar 

  25. Ricci, F., Avesani, P.: Data compression and local metrics for nearest neighbor classification. IEEE Trans. Pattern Anal. Mach. Intell. 21(4), 380–384 (1999)

    Article  Google Scholar 

  26. Scaringella, N., Zoia, G., Mlynek, D.: Automatic genre classification of music content: a survey. IEEE Sig. Process. Mag. 23(2), 133–141 (2006)

    Article  Google Scholar 

  27. Schweizer, B., Sklar, A.: Statistical metric spaces. Pacific J. Math 10(1), 313–334 (1960)

    Article  MathSciNet  Google Scholar 

  28. Sigtia, S., Dixon, S.: Improved music feature learning with deep neural networks. In: 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 6959–6963. IEEE (2014)

    Google Scholar 

  29. Silla, C.N., Koerich, A.L., Kaestner, C.A.: A machine learning approach to automatic music genre classification. J. Braz. Comput. Soc. 14(3), 7–18 (2008)

    Article  Google Scholar 

  30. Simsekli, U.: Automatic music genre classification using bass lines. In: 2010 20th International Conference on Pattern Recognition (ICPR), pp. 4137–4140. IEEE (2010)

    Google Scholar 

  31. Tzanetakis, G., Cook, P.: Musical genre classification of audio signals. IEEE Trans. Speech Audio Process. 10(5), 293–302 (2002)

    Article  Google Scholar 

  32. Vitányi, P.M.: Information distance in multiples. IEEE Trans. Inf. Theory 57(4), 2451–2456 (2011)

    Article  MathSciNet  Google Scholar 

  33. Weinberger, K.Q., Saul, L.K.: Distance metric learning for large margin nearest neighbor classification. J. Mach. Learn. Res. 10(Feb), 207–244 (2009)

    Google Scholar 

  34. Weka 3. http://www.cs.waikato.ac.nz/~ml/weka/

  35. Werenski, S.: Topologia (in Polish). Politechnika Radomska, Wydawnictwo (2008)

    Google Scholar 

  36. West, K., Cox, S.: Features and classifiers for the automatic classification of musical audio signals. In: ISMIR (2004)

    Google Scholar 

  37. Wu, X., et al.: Top 10 algorithms in data mining. Knowl. Inf. Syst. 14(1), 1–37 (2008)

    Article  Google Scholar 

  38. Xu, C., Maddage, N.C., Shao, X., Cao, F., Tian, Q.: Musical genre classification using support vector machines. In: Proceedings of the 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, ICASSP 2003, vol. 5, pp. V–429. IEEE (2003)

    Google Scholar 

  39. Zheng, J., Oussalah, M.: Automatic system for music genre classification. ntM 1, 1 (2006)

    Google Scholar 

  40. Zyt, J., Klosgen, W., Zytkow, J.: Handbook of Data Mining and Knowledge Discovery (2002)

    Google Scholar 

Download references

Acknowledgements

This work was partly supported by BKM-509/RAU2/2017 and by Statutory Research funds of Institute of Informatics, Silesian University of Technology, Gliwice, Poland (grant No BK-213/RAU2/2018).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Kostrzewa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kostrzewa, D., Brzeski, R., Kubanski, M. (2018). The Classification of Music by the Genre Using the KNN Classifier. In: Kozielski, S., Mrozek, D., Kasprowski, P., Małysiak-Mrozek, B., Kostrzewa, D. (eds) Beyond Databases, Architectures and Structures. Facing the Challenges of Data Proliferation and Growing Variety. BDAS 2018. Communications in Computer and Information Science, vol 928. Springer, Cham. https://doi.org/10.1007/978-3-319-99987-6_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-99987-6_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-99986-9

  • Online ISBN: 978-3-319-99987-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics