Implementasi Algoritma Klasifikasi K-Nearest Neighbors untuk Prediksi Risiko Depresi pada Pengguna Media Sosial
DOI:
https://doi.org/10.51903/mifortekh.v6i2.1351Kata Kunci:
Depression, Social Media, K-Nearest Neighbor, Machine Learning, ClassificationAbstrak
This study focuses on developing a classification model to predict the level of depression risk among social media users using machine learning techniques. This research is based on the increasing use of social media, which may have negative impacts on mental health, particularly depression, thus highlighting the importance of early detection. This study applies a quantitative approach using the K-Nearest Neighbor (KNN) algorithm as the classification method. The dataset used is secondary data obtained from Kaggle, consisting of 481 respondents, including variables related to social media usage behavior and mental health indicators. This research stages include data preprocessing, splitting the dataset into training and testing sets with an 80:20 ratio, model training, and evaluation using accuracy and F1-score metrics. The results show that KNN algorithm is capable of classifying depression risk into several categories, with an accuracy of 38%. This indicates that the model demonstrates an initial classification capability, although its performance still needs improvement. Therefore, further development is required to enhance the model’s accuracy in supporting early detection of depression risk based on social media behavioral data
Referensi
Abimanyu, Satria, Nurdin Bahtiar, dan Eko Adi Sarwoko. (2023). “Implementasi Metode Support Vector Machine (SVM) Dan t-Distributed Stochastic Neighbor Embedding (t-SNE) Untuk Klasifikasi Depresi.” Jurnal Masyarakat Informatika 14(2): 146–58.
Ahmed, Souvik. (2023). “Social Media and Mental Health.” Kaggle. https://www.kaggle.com/datasets/souvikahmed071/social-media-and-mental-health
Attagantari, Hidayat, dan Wijaya (2025). “Prediksi Tingkat Risiko Depresi Pada Mahasiswa Menggunakan Algoritma K-Nearest Neighbor” Jurnal Ilmiah Intech : Information Technology Journal of UMUS Vol.07, No.02, November 2025, pp. 30
Handayani, S., & Nuraini, R. (2021). Hubungan Intensitas Penggunaan Media Sosial dengan Kecenderungan Depresi pada Mahasiswa. Jurnal Psikologi Indonesia, 10(2), 101–110.
Imam Syafi’i Maulana, Sherly Dian Tiara (2025). “Prediksi Risiko Depresi pada Mahasiswa Menggunakan Algoritma Random Forest Berdasarkan Data Akademik dan Gaya Hidup”
Jusriadi, Yusuf, dan Rahman (2025). “Hubungan Antara Intensitas Penggunaan Media Sosial Dengan Gejala Depresi Pada Mahasiswa Fkm Umi”. Window of Public Health Journal, Vol. 6 No. 3 (Juni, 2025) : 589-597
Kuss, D. J., Griffiths, M. D. (2017). Social Networking Sites and Addiction: Ten Lessons Learned. International Journal of Environmental Research and Public Health, 14(3), 311.
Lestari, A., Pratama, D. (2023). Prediksi Tingkat Kesehatan Mental Menggunakan Algoritma KNN dan Decision Tree. Jurnal Informatika dan Sains, 9(1), 55–63.
Nurdiansyah, M., dkk. (2024). Analisis Kesehatan Mental untuk Mencegah Gangguan Mental pada Mahasiswa Menggunakan Algoritma K-Nearest Neighbor (K-NN) dan Random Forest. MALCOM: Indonesian Journal of Machine Learning and Computer Science, 4(5), 1731–1740.
Purwanto, Dwi, Fatiha Sri, dan Utami Tamad. (2022). “Gambaran Faktor Risiko Gejala Depresi Pada Mahasiswa Teknik Mesin Universitas Muhammadiyah Purwokerto.” Jurnal Pendidikan Teknik Mesin 22(1): 25–28.
Sudarsono, Bernadus Gunawan, dan Sri Poedji Lestari. (2020). “Diagnosa Tingkat Depresi Mahasiswa Akhir Terhadap Penelitian Ilmiah Menggunakan Algoritma K-Nearest Neighbor.” Jurnal Media Informatika Budidarma 4(4): 1094–99. http://ejurnal.stmikbudidarma.ac.id/index.php/mib/article/view/2448.
World Health Organization. (2023). Depression. Geneva: World Health Organization. https://www.who.int/news-room/fact-sheets/detail/depression
Unduhan
Diterbitkan
Terbitan
Bagian
Lisensi
Hak Cipta (c) 2026 Jurnal Manajemen Informatika & Teknologi

Artikel ini berlisensiCreative Commons Attribution-ShareAlike 4.0 International License.









