Comparison of Hyperparameter Tuning in Decision Tree and Random Forest Algorithms for Song Genre Classification - Maitsa, Anindita; Winarsih , Nurul Annisa (Politeknik Negeri Batam, 2025)
This research applies Decision Tree and Random Forest algorithms for music genre classification based on audio numerical features such as tempo, energy, loudness, and valence. The dataset used comes from Kaggle and consists of 7,958 song entries from eight genres. The data was processed through pre-processing stages that included duplication removal, empty value handling, normalization, outlier removal, and class balancing using the SMOTE technique. In the initial test, Random Forest showed an accuracy of 85%, higher than Decision Tree which recorded 76%. After hyper parameter tuning using GridSearchCV, Decision Tree's accuracy increased to 79%, while Random Forest experienced a slight decrease to 84%. This decrease does not reflect a decrease in performance, but rather a more balanced redistribution of predictions to minor classes, as reflected by the stable F1-score macro value at 0.84. In terms of efficiency, tuning the Random Forest took much longer (806.81 seconds) than the Decision Tree (17.42 seconds), indicating that model complexity has a direct impact on training time. These findings suggest that data quality, tuning strategy and time efficiency are important factors in building a reliable and balanced music genre classification system.