ANALISIS KESEHATAN MENTAL BERDASARKAN PREFERENSI MUSIK MENGGUNAKAN K-MEANS CLUSTERING
Keywords:
K-Means Clustering, Mental Health, Music PreferenceAbstract
This study aims to identify patterns of mental health conditions based on music preferences using the K-Means Clustering algorithm. The research employed secondary data obtained from the Music & Mental Health Survey Results dataset available on Kaggle. The initial dataset consisted of 736 records and was processed through data preprocessing, including missing value removal, attribute selection, data encoding, and normalization. After preprocessing, 616 valid records with six variables (Fav Genre, Hours per Day, Anxiety, Depression, Insomnia, and Music Effects) were analyzed. The K-Means algorithm was implemented with three clusters to classify respondents according to similarities in their mental health characteristics. The results indicate that the algorithm successfully grouped respondents into three distinct clusters representing low, moderate, and high levels of mental health conditions. The second cluster showed the lowest average scores for anxiety, depression, and insomnia, while the third cluster exhibited the highest scores. These findings demonstrate that K-Means Clustering is capable of identifying patterns between music preferences, listening habits, and mental health conditions. The results may serve as preliminary information for future data-driven mental health studies.
References
F. Sari, M. Kuntari, W. Yati, H. Khaulasari, dan M. Hafiyusholeh, “Implementasi K-Means Clustering Melalui
Pemanfaatan Sampling Kombinasi Pada Pengelompokan Pola Kesehatan Mental Mahasiswa Sains dan
Teknologi,” J. Nas. Teknol. Dan Sist. Inf., vol. 11, no. 1, hlm. 9–16, Apr 2025, doi:
10.25077/TEKNOSI.v11i01.2025.9-16.
D. Ayu Ramadhanty, Renita Syafitri, Errissya Rasywir, dan Despita Meisak, “Implementasi Data Mining
Untuk Menentukan Persediaan Stok Obat Di Apotek K-24 Menggunakan Metode K-Means Clustering,” J.
Inform. Dan Rekayasa KomputerJAKAKOM, vol. 2, no. 1, hlm. 155–160, Apr 2022, doi:
10.33998/jakakom.2022.2.1.31.
E. D. Putra, M. H. Rifqo, D. Deslianti, dan K. Krismiyani, “Analysis of The Theme Clustering Algorithm Using
K-Means Method,” J. Komput. Inf. Dan Teknol., vol. 2, no. 2, hlm. 431–442, Des 2022, doi:
10.53697/jkomitek.v2i2.884.
“Analisis Cluster Kualitas Pemuda di Indonesia pada Tahun 2022 dengan Agglomerative Hierarchical dan
K-Means | Komputika : Jurnal Sistem Komputer.” Diakses: 2 Mei 2026. [Daring]. Tersedia pada:
https://ojs.unikom.ac.id/index.php/komputika/article/view/10348
“Implementasi K-Means Clustering Melalui Pemanfaatan Sampling Kombinasi Pada Pengelompokan Pola
Kesehatan Mental Mahasiswa Sains dan Teknologi | Jurnal Nasional Teknologi dan Sistem Informasi.”
Diakses: 2 Mei 2026. [Daring]. Tersedia https://teknosi.fti.unand.ac.id/index.php/teknosi/article/view/2884?utm_source=chatgpt.com
M. B. Fajri dan S. D. Purnamasari, “Klasterisasi Pola Penyebaran Penyakit Pasien Berdasarkan Usia Pasien
Menggunakan K-Means Clustering,” J. Inf. Technol. Ampera, vol. 3, no. 3, hlm. 317–334, Des 2022, doi: 10.51519/journalita.volume3.isssue3.year2022.page317-334.
J. Parhusip, J. Feranita, M. P. Mentari, T. Apriliani, dan A. M. Jessend, “Implementasi Algoritma K-Means
Clustering Untuk Segmentasi Tingkat Kesehatan Mental Mahasiswa Berdasarkan Faktor Stress Dan
Akademik,” J. Media Inform., vol. 7, no. 1, hlm. 449–458, Feb 2026, doi: 10.55338/jumin.v7i1.7856.
A. Nugroho dan R. A. Putri, “Clustering YouTube Comments on Mental Health in Indonesia Using the K
Means Algorithm,” J. Ris. Komput. JURIKOM, vol. 13, no. 2, hlm. 537–544, Apr 2026, doi:
10.30865/jurikom.v13i2.9552.
R. D. Fitri, “PENGARUH MUSIK TERHADAP MOOD DAN EMOSI PERAN MUSIK DALAM KESEHATAN
MENTAL,” Circ. Arch., vol. 1, no. 4, Mei 2024, Diakses: 2 Mei 2026. [Daring]. Tersedia pada: https://circle
archive.com/index.php/carc/article/view/103
B. Hartono, S. Eniyati, dan K. Hadiono, “Perbandingan Metode Perhitungan Jarak pada Nilai Centroid dan
Pengelompokan Data Menggunakan K-Means Clustering,” J. Sist. Komput. Dan Inform. JSON, vol. 4, no.
3, hlm. 503, Mar 2023, doi: 10.30865/json.v4i3.6021.
Qomariyah dan M. U. Siregar, “Comparative Study of K-Means Clustering Algorithm and K-Medoids
Clustering in Student Data Clustering,” JISKA J. Inform. Sunan Kalijaga, vol. 7, no. 2, hlm. 91–99, Mei 2022,
doi: 10.14421/jiska.2022.7.2.91-99.
Y. M. Geasela dkk., “Analysis of Student Mental Health Dataset Using Mining Techniques,” J. Comput. Sci.,
vol. 20, no. 1, hlm. 121–128, Jan 2024, doi: 10.3844/jcssp.2024.121.128.
K. Wang, S. Gao, dan J. Huang, “Learning About Your Mental Health From Your Playlist? Investigating the
Correlation Between Music Preference and Mental Health of College Students,” Front. Psychol., vol. 13,
hlm. 824789, Apr 2022, doi: 10.3389/fpsyg.2022.824789.
N. A. Maori dan E. Evanita, “Metode Elbow dalam Optimasi Jumlah Cluster pada K-Means Clustering,”
Simetris J. Tek. Mesin Elektro Dan Ilmu Komput., vol. 14, no. 2, hlm. 277–288, Nov 2023, doi:
10.24176/simet.v14i2.9630.
L. R. Iyohu, Ismail Djakaria, dan La Ode Nashar, “Perbandingan Metode K-Means Clustering dengan Self
Organizing Maps (SOM) untuk Pengelompokan Provinsi di Indonesia Berdasarkan Data Potensi Desa,” J.
Stat. Dan Apl., vol. 7, no. 2, hlm. 195–206, Des 2023, doi: 10.21009/JSA.07208.
F. A. Fitrony and F. Pereira, “Multiclass Classification of Brain Tumors in MRI Images Based on Deep
Learning,” J. Kesehat. dan Sci., vol. 2, no. 1, pp. 38–46, 2026.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Maryanti, Wardianto

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





