Comparison of Random Forest and Naive Bayes Algorithms in Classification of Song Popularity on the Spotify Platform

Sakti Attila Aulia Bintang, Rafi Akbar Muzaki, Al Fathan Joan Ramadhan Sembiring

Abstract


The purpose of this study is to use machine learning to rank Spotify songs based on how popular they are. Because there is so much music data out there, musicians and artists need to know if a song will be popular or not. The dataset has 8,778 songs, each with different features like how popular the artist is, how many followers they have, and other song details. This research evaluates the efficacy of two classification algorithms: Random Forest and Naive Bayes. Artist popularity, artist followers, explicit album total tracks, and track number are the main things that are used to make models. The results of the experiment show that the Random Forest algorithm works better than the Naive Bayes algorithm. The Random Forest algorithm was right 76.54% of the time, but the Naive Bayes algorithm was only right 72.21% of the time. The f1-score for both popularity classes is also better for Random Forest. This finding shows that ensemble-based models, like Random Forest, work better with the features of music popularity data than basic probabilistic models do.

Keywords


Spotify; Random Forest; Naive Bayes; Classification Genre; Machine Learning

Full Text:

PDF

References


Visutsak et al. (2025) Visutsak, P., Loungna, J., Sopromrat, S., Jantip, C., Soponkittikunchai, P., & Liu, X. (2025). Mood-Based Music Discovery: A System for Generating Personalized Thai Music Playlists Using Emotion Analysis. Applied System Innovation, 8(2), 37.

Lee & Tu (2025) Lee, C.-Y., & Tu, Y.-N. (2025).

Predicting Hit Songs Using Audio and Visual Features. Engineering Proceedings, 89(1), 43.

Shu (2024) Shu, M. (2024). Exploring Spotify's Music Popularity Dynamics and Forecasting with Machine Learning. Dalam Proceedings of the 2nd International Conference on Applied Physics and Mathematical Modeling (hlm. 83-91).

Yee & Raheem (2022) Yee, Y. K., & Raheem, M. (2022). Predicting Music Popularity Using Spotify and YouTube Features. Indian Journal of Science and Technology, 15(36), 1786-1799.

Marsya et al. (2025) Marsya, N. D., Munadhil, M. M., Dzakyananta, M. A., Amaliah, K., & Rofiantos, D. (2025). Penerapan Algoritma Random Forest dalam Prediksi Emosi Musik Berdasarkan Karakteristik Fitur Audio Spotify. Jurnal Sains Informatika Terapan (JSIT), 4(2), 435-440.

Bahadure et al. (2025) Bahadure, N. B., Vishwakarma, M., Kurhekar, M. P., Patni, J. C., & Patil, P. D. (2025). Machine Learning-Based Music Classification and Recommendation System from Spotify. International Journal of Computer Information Systems and Industrial Management Applications, 17, 143-154.

Fakhriza et al. (2025) Fakhriza, F., Subekti, D., & Cahyo, P. W. (2025). Optimalisasi Algoritma Random Forest - Feature Selection dan Hyperparameter Tuning Klasifikasi Genre Musik. JIKA (Jurnal Informatika) Universitas Muhammadiyah Tangerang, 9(1), 16-25.

Kamilah et al. (2024) Kamilah, H., Oktaviana, E., Hariyanto, V., Robi'atul Adawiyah, N. A., & Imannulloh, D. T. (2024). Prediksi Tren Musik Tahun 2024 pada Platform Spotify Menggunakan Metode Random Forest Regressor. Analitik dan Visualisasi Data.

Matusevičius (2021) Matusevičius, M. (2021). User Churn Prediction within Music Streaming Service Industry: A Comparison of Machine Learning Models (Tesis Master tidak diterbitkan). Tilburg University, Belanda.

Nasution (2024) Nasution, M. Q. R. (2024). Implementasi Algoritma Random Forest pada Sistem Rekomendasi Musik Menggunakan Teknik Collaborative Filtering (Skripsi tidak diterbitkan). Universitas Medan Area, Medan.

Dhamara et al. (2025) Dhamara, G. Z., Sucipto, & Nugroho, A. (2025). Klasifikasi Genre Musik Menggunakan Machine Learning. Bulletin of Information Technology (BIT), 6(3), 206-217 .

Fakhriza et al. (2025) Fakhriza, F., Subekti, D., & Cahyo, P. W. (2025). Optimalisasi Algoritma Random Forest - Feature Selection dan Hyperparameter Tuning Klasifikasi Genre Musik. JIKA (Jurnal Informatika) Universitas Muhammadiyah Tangerang, 9(1), 16-25.

Fiqri et al. (2025) Fiqri, M., Lizen, F. B. S., & Ikrom, M. (2025). Implementation of Supervised Learning Algorithm on Spotify Music Genre Classification. IJATIS: Indonesian Journal of Applied Technology and Innovation Science, 2(1), 7-12 .

Ginabila & Fauzi (2023) Ginabila, & Fauzi, A. (2023). Analisis Sentimen Terhadap Pemutar Musik Online Spotify Dengan Algoritma Naive Bayes dan Support Vector Machine. Jurnal Ilmiah ILKOMINFO - Jurnal Ilmu Komputer dan Informatika, 6(2), 111-125.

Ginn & Johnson (2024) Ginn, B., & Johnson, N. (2024). Evaluating the Efficacy of Random Forest in Mood Classification for Music Recommendation System.

Marlia et al. (2024) Marlia, S., Setiawan, K., & Juliane, C. (2024). Analisis Fitur Musik dan Tren Popularitas Lagu di Spotify menggunakan K-Means dan CRISP-DM. SISTEMASI: Jurnal Sistem Informasi, 13(2), 595-607.

Navisa et al. (2021) Navisa, S., Hakim, L., & Nabilah, A. (2021). Komparasi Algoritma Klasifikasi Genre Musik pada Spotify Menggunakan CRISP-DM. Jurnal Sistem Cerdas, 4(2), 114-125.

Saragih (2023) Saragih, H. S. (2023). Predicting song popularity based on Spotify's audio features: insights from the Indonesian streaming users. Journal of Management Analytics, 10(4), 693-709 .

Shulhiyana & Voutama (2025) Shulhiyana, S., & Voutama, A. (2025). Penerapan Metode K-Means Clustering untuk Pengelompokkan Musik Berdasarkan Karakteristik Audio. Jurnal Nasional Ilmu Komputer, 6(2), 1-10.

Wau & Fatmawati (2025) Wau, R. E. S., & Fatmawati. (2025). Klasifikasi Sentimen Ulasan Aplikasi Spotify Di Google Play Store Menggunakan Algoritma C4.5. IJCIT (Indonesian Journal on Computer and Information Technology), 10(1), 1-9.

Anggoro & Izzatillah (2022) Anggoro, M. V., & Izzatillah, M. (2022). Sistem Rekomendasi Musik dengan Metode Collaborative Filtering Berbasis Android. STRING (Satuan Tulisan Riset dan Inovasi Teknologi), 7(1), 94-102.

Beesa et al. (2023) Beesa, P., Naregavi, V., Imandar, J., & Thatte, S. (2023). Songs Popularity Analysis Using Spotify Data: An exploratory study. Vidhyayana - An International Multidisciplinary Peer-Reviewed E-Journal, 8(2), 17-25.

Jiang (2023) Jiang, S. (2023). Predicting Music Popularity: A Machine Learning Approach Using Spotify Data. Dalam Proceedings of the 2023 International Conference on Computer Science and Artificial Intelligence (hlm. 1-7). Huazhong University of Science and Technology.

Setiawan et al. (2024) Setiawan, Y., Hadiana, A. I., & Umbara, F. R. (2024). Customer Churn Prediction Using the Random Forest Algorithm. JIKO (Jurnal Informatika dan Komputer), 7(3), 209-216.

Tannady et al. (2024) Tannady, H., Andry, J. F., Honni, & Lee, F. S. (2024). Analisis Big Data Spotify dengan Metode Data Mining. JBASE - Journal of Business and Audit Information Systems, 7(2), 52-59.




DOI: http://dx.doi.org/10.22441/collabits.v3i1.37578

Refbacks

  • There are currently no refbacks.


Journal Collabits
Portal ISSNPrint ISSN: 3062-8601
Online ISSN: 3046-6709

Sekretariat
Fakultas Ilmu Komputer
Universitas Mercu Buana
Jl. Raya Meruya Selatan, Kembangan, Jakarta 11650
Tlp./Fax: +62215871335

http://publikasi.mercubuana.ac.id/index.php/collabits

e-mail: [email protected]

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.