Implementation of the Hybrid K-Nearest Neighbour Algorithm for Dangdut Music Sub-Genre Classification - Tria Hikmah Fratiwi; I Gede Harsemadi; Putu Tjintia Kencana Dewi; Luh Rediasih; M. Alvinnur Filardi; I Dewa Made Dharma Putra Santika (Politeknik Negeri Batam, 2025)
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.