4 RESULT COMPARING
By comparing the accuracy shown before, CNN can
provide 72.4% accuracy in predicting the music
genres however KNN’s accuracy can reach 81% by
using the same dataset, which provides evidence that
KNN performs better in predicting various music
genres. KNN’s good performance can be attributed to
its efficacy in handling the specific characteristics of
the GTZAN dataset. This demonstrates that the
feature space of this dataset is well-suited for KNN's
distance-based classification approach. Also shows
that simpler algorithms like KNN can be more
effective than their more complex counterparts in
dealing with datasets where genres are well-separated
in the feature space.
However, it's important to note that while KNN
showed higher accuracy, it was not without its
limitations. The algorithm struggled with genres that
had subtle differences, a common issue in genre
classification due to the subjective nature of music.
Despite this, the overall performance of KNN was
notably robust across the diverse genres present in the
GTZAN dataset.
Although the performance of CNN is lower than
KNN in this instance, was still noteworthy. CNN's
ability to extract layered and complex features from
the music tracks was evident, though it did not
translate into superior accuracy in this particular
study. This suggests that while CNNs are powerful
tools for pattern recognition, their effectiveness can
vary depending on the dataset and the specific
characteristics of the task at hand.
5 COMPARATIVE ANALYSIS
The comparative analysis between KNN and CNN in
this study offers valuable insights into the
applicability of these algorithms in music genre
classification. KNN’s success indicates that for
certain datasets, simpler algorithms can not only
compete with but also surpass more complex models
like CNN in terms of accuracy.
However, CNN's lower performance in this
context does not diminish its potential in other
scenarios. CNNs are known for handling complex
patterns and large datasets, making them suitable for
tasks where the feature space is not as clearly defined
or where the data is more complex.
In conclusion, this study highlights that the choice
between KNN and CNN for music genre
classification should not be based on the complexity
of the algorithm alone. Instead, it should be informed
by the characteristics of the dataset and the specific
requirements of the classification task. The paper's
findings suggest that in scenarios where the feature
space is well-structured and genres are distinctly
separable, simpler algorithms like KNN can provide
superior performance.
6 CONCLUSION
This paper uses the GTZAN dataset to test the
accuracy between two common algorithms, KNN and
CNN, used in automatic music genre classification.
The result is that KNN performs better. Therefore,
sometimes simple methods can be more effective
compared with difficult methods.
Music always plays an important part in people’s
daily lives, and using machine learning to classify
music genres automatically can be important to
change the way people appreciate music. Also, with
the great improvement nowadays in machine learning
and music databases, music genres can be more and
more advanced in the future.
The study underscored the potential of machine
learning algorithms in music genre classification,
with KNN showing promising results. This proves
that the modern music industry can use KNN to build
an auto music genre classification application.
However, it also highlighted the need for more
nuanced approaches to address the inherent
complexity and subjectivity in music genres.
REFERENCES
P. M. H. Steve, What is a Music Genre? Definition,
Explanation & Examples, 2023 available at
https://promusicianhub.com/what-is-music-genre/
Q. He, Mathematical Problems in Engineering, (2022).
Andrada, GTZAN Dataset - Music Genre Classification,
2020, https://www.kaggle.com/andradaolteanu/ gtzan-
dataset-music-genre-classification
Data Flair, Python Project – Music Genre Classification,
2020, available at https://data-flair.training/blogs/
python-project-music-genre-classification/
B. Logan, Ismir. 270 (1): 11, (2000).
T. Bäckström, Introduction to Speech Processing. Aalto
University, (2024).
Y. Liu, G. Liu, D. Wei, et al, Frontiers in Psychology, 9,
2118, (2018).
M. Sköld, “The Visual Representation of Timbre,”
Organised Sound, vol. 27, no. 3, pp. 387–400, 2022.
A. Ghildiyal, K. Singh, S. Sharma, “Music genre
classification using machine learning”. In 2020 4th