Implementation of the Hybrid K-Nearest Neighbour Algorithm for Dangdut Music Sub-Genre Classification
DOI:
https://doi.org/10.30871/jaic.v9i4.9702Keywords:
Dangdut, Genetic Algorithm, Classification, K-Nearest Neighbor, Music Information RetrievalAbstract
This research focuses on the classification of dangdut sub-genres — classical, rock, and koplo — by collecting 136 songs from Ellya Khadam, Rhoma Irama, and Denny Caknan, each representing distinct eras of dangdut music. From these, 483 music segments of 30 seconds each were extracted and labelled with expert assistance to ensure accuracy. Six spectral features (centroid, skewness, rolloff, kurtosis, spread, and flatness) were computed and stored in a dataset divided into 70% training and 30% testing sets. The Hybrid K-NN algorithm, integrating Genetic Algorithm (GA) to optimize the k parameter, was applied and evaluated through 5-fold cross-validation. GA parameters were set to a population size of 10, 15 generations, 4-bit chromosome length, and 3-fold cross-validation during optimization. Hybrid K-NN achieved the highest accuracy of 74.31% at k=4 with a processing time of 4.86 seconds, outperforming conventional K-NN (68.75% at k=4, 0.04 seconds), Decision Tree (61.11%, 0.42 seconds), and SVM with ECOC (54.86%, 1.99 seconds). The Hybrid K-NN also demonstrated stable performance with an average accuracy of 72.04% and a standard deviation of 2.22 percent, while the average precision, recall, and F1-score were each around 0.72. Confusion matrix analysis revealed frequent misclassification of class 2 as class 1, highlighting a classification challenge. Overall, this research shows that Hybrid K-NN is more effective than the other methods in capturing data patterns, optimizing parameters, and generalizing to unseen data, though at the cost of longer computation time due to GA’s iterative optimization and validation processes.
Downloads
References
[1] D. Setiaji, “Tinjauan Karakteristik Dangdut Koplo Sebagai Perkembangan Genre Musik Dangdut,” Handep (Pasca Sarjana institut Seni Indonesia Surakarta), vol. 1, pp. 19–34, Dec. 2017.
[2] F. G. Hananta, “Pergeseran Instrumentasi Karakteristik Musik Dangdut Era Digital Di Jawa Timur,” Repertoar, vol. 1, Jul. 2023.
[3] B. R. Ismanto, T. M. Kusuma, and D. Anggraini, “Indonesian Music Classification on Folk and Dangdut Genre Based on Rolloff Spectral Feature Using Support Vector Machine (SVM) Algorithm,” IJCCS (Indonesian Journal of Computing and Cybernetics Systems), vol. 15, no. 1, p. 11, Jan. 2021, doi: 10.22146/ijccs.54646.
[4] X. Li, F. Li, Z. P. Lu, and Z. Yang, “Music Genre Classification: A Comprehensive Study on Feature Fusion with CNN and MLP Architectures,” 2025, doi: 10.54254/2755-2721/132/2024.20632.
[5] I. Gede Harsemadi, “Perbandingan Kinerja Algoritma K-NN dan SVM dalam Sistem Klasifikasi Genre Musik Gamelan Bali,” INSANI Informatics for Educators and Professionals: Journal of Informatics, vol. 8, no. 1, pp. 1–10, 2023, [Online]. Available: www.joox.com
[6] T. H. Fratiwi, M. Sudarma, and N. Pramaita, “Sistem Klasifikasi Musik Gamelan Angklung Bali Terhadap Suasana Hati Menggunakan Algoritma K-Nearest Neighbor Berbasis Algoritma Genetika,” Majalah Ilmiah Teknologi Elektro, vol. 20, no. 2, p. 265, Dec. 2021, doi: 10.24843/mite. 2021.v20i02.p10.
[7] M. Ikhwan, Kepikiran Dangdut. Yogyakarta: Warning Books, 2023.
[8] A. Lerch, An Intoduction to Audio Content Analysis: Music Information Retrieval, Task and Application, Second Edition. New Jersey: John Wiley & Sons, Inc., 2023.
[9] W. Andriyani et al., Matematika Pada Kecerdasan Buatan, Pertama. Makassar: CV. Tohar Media, 2024.
[10] W. Andriyani et al., Data Sebagai Fondasi Kecerdasan Buatan, Pertama. Makassar: CV. Tohar Media, 2024.
[11] P. Suwirmayanti, R. A. N. Diaz, I. K. G. D. Putra, and K. Budiarta, Data Mining: Teknik, Implementasi, dan Aplikasi, Pertama. Yogyakarta: Andi, 2023.
[12] N. T. S. Saptadi et al., Data Mining. Batam: Yayasan Cendikia Mulia Mandiri, 2024.
[13] J. Eronen, M. Ptaszynski, F. Masui, G. Leliwa, and M. Wroczynski, “Exploring the Potential of Feature Density in Estimating Machine Learning Classifier Performance with Application to Cyberbullying Detection,” in CEUR Workshop Proceedings 2935, 2022. doi: 10.48550/arXiv.2206.01949.
[14] C. Mahlich, T. Vente, and J. Beel, “From Theory to Practice: Implementing and Evaluating e-Fold Cross-Validation,” in International Conference on Artificial Intelligence and Machine Learning Research (CAIMLR 2024), Singapore, 2024.
[15] B. Ghojogh and M. Crowley, “The Theory Behind Overfitting, Cross Validation, Regularization, Bagging, and Boosting: Tutorial,” May 2023, [online]. Available: http://arxiv.org/abs/1905.12787
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Tria Hikmah Fratiwi, I Gede Harsemadi, Putu Tjintia Kencana Dewi, Luh Rediasih, M. Alvinnur Filardi, I Dewa Made Dharma Putra Santika

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








