Predicting Depression Risk Levels in College Students Using the K-Nearest Neighbor Algorithm
Main Article Content
Abstract
Abstract
College students often experience academic, social, and personal stress that can lead to mental health issues such as depression. If left untreated, this condition can disrupt academic achievement and social relationships, and even trigger extreme behavior. This study aims to design and develop a system to predict the risk of depression in college students using the K-Nearest Neighbor (KNN) classification algorithm. Data were collected from 300 students through a Likert-scale questionnaire. The system was developed using Python for pre-processing. The analysis process included data selection, cleaning, transformation, classification with KNN, and performance evaluation using a confusion matrix. Testing of 60 test data sets yielded 85% accuracy, 90% precision, and 83% recall. This system has the potential to be used as an early detection tool for students and educational institutions.
Keywords : Depression, Students, K-Nearest Neighbor, Classification, Data Mining
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
References
Abimanyu, S., Bahtiar, N., & Sarwoko, E. A. (2023). Implementasi metode support vector machine (SVM) dan t-distributed stochastic neighbor embedding (t-SNE) untuk klasifikasi depresi. Jurnal Masyarakat Informatika, 14(2), 146–158.
Purwanto, D., Sri, F., & Tamad, U. (2022). Gambaran faktor risiko gejala depresi pada mahasiswa teknik mesin Universitas Muhammadiyah Purwokerto. Jurnal Pendidikan Teknik Mesin, 22(1), 25–28.
Sudarsono, B. G., & Lestari, S. P. (2020). Diagnosa tingkat depresi mahasiswa akhir terhadap penelitian ilmiah menggunakan algoritma k-nearest neighbor. Jurnal Media Informatika Budidarma, 4(4), 1094–1099. http://ejurnal.stmik-budidarma.ac.id/index.php/mib/article/view/2448
Maulana, S., Premana, A., & Irawan, B. (2025). Prediksi Prestasi Akademik Siswa Terbaik Menggunakan Algoritma Decision Tree Berbasis Data Historis. JATI (Jurnal Mahasiswa Teknik Informatika), 9(5), 7890-7897.
Triono, A., Budi, A. S., & Abdillah, R. (2023). Implementasi peretasan sandi Vigenere cipher menggunakan bahasa pemrograman Python. Jurnal JOCOTIS – Journal of Computer Science, Informatics and Robotics, 1(1), 1–9. https://jurnal.ittc.web.id/index.php/jumri
Utami, S. P. (2024). Klasifikasi kesehatan mental usia remaja menggunakan algoritma decision tree. Skripsi. Jakarta.