Classification of University Students’ Mental Health Conditions Using the Logistic Regression Algorithm

Authors

  • Dini Pratiwi Internet Engineering Technologi, Politeknik Negeri Lampung
  • Yulia Roslina Internet Engineering Technologi, Politeknik Negeri Lampung

DOI:

https://doi.org/10.25181/rt.v5i1.4742

Keywords:

mental health, student, classification, logistic regression, machine learning

Abstract

Student mental health has become a critical issue in higher education, as it directly affects students’ well-being and academic performance. Academic, social, and psychological pressures faced by university students increase the risk of mental health disorders such as depression and anxiety. This study aims to classify students’ mental health conditions, particularly the risk of depression, using the Logistic Regression algorithm and to compare its performance with a baseline model and the K-Nearest Neighbors (KNN) algorithm. The dataset used in this study is the Student Mental Health dataset obtained from the Kaggle platform, consisting of 101 student records with demographic, academic, and psychological variables. The research process includes data preprocessing, splitting the dataset into training and testing sets with an 80:20 ratio, classification modeling, and performance evaluation using accuracy, precision, recall, and F1-score metrics. The results show that Logistic Regression achieves the best performance compared to the other models, with an accuracy of 0.85, precision of 1.00, recall of 0.57, and an F1-score of 0.73. The baseline model achieves an accuracy of 0.65 but fails to detect any depression cases, while KNN (k = 5) produces a lower accuracy of 0.55. Further analysis indicates that psychological factors such as Marital, Treatment, and Anxiety significantly contribute to the prediction of depression among students. Based on these findings, Logistic Regression is considered an effective and relevant approach for classifying depression risk among university students and has the potential to support early detection of mental health problems in higher education environments.

Downloads

Download data is not yet available.

References

A. N. M. Pudjianto dan E. Y. Hidayat, “Perbandingan Prediksi Depresi Mahasiswa dengan Linear Regression, Random Forest, dan Gradient Boosting,” SINTECH Sci. Inf. Technol. J., vol. 7, no. 3, hlm. 180–189, Des 2024, doi: 10.31598/sintechjournal.v7i3.1729.

Y. Feng, J. Li, T. Liu, Y. Wei, dan N. Li, “Construction of a mental health risk model for college students with long and short-term memory networks and early warning indicators,” J. Intell. Syst., vol. 33, no. 1, Jan 2024, doi: 10.1515/jisys-2023-0318.

M. P. Kayla dan R. A. Saputra, “Klasifikasi Penyakit Gangguan Jiwa menggunakan Metode Logika Fuzzy,” Telematika, vol. 20, no. 3, hlm. 416, Nov 2023, doi: 10.31315/telematika.v20i3.11789.

O. S. D. Fadhillah, J. H. Jaman, dan C. Carudin, “Perbandingan Naive Bayes, Support Vector Machine, Logistic Regression Dan Random Forest Dalam Menganalisis Sentimen Mengenai Tiktokshop,” J. Inform. Dan Tek. Elektro Terap., vol. 13, no. 1, Jan 2025, doi: 10.23960/jitet.v13i1.5746.

M. Pulungan, A. Purnomo, dan A. Kurniasih, “Penerapan SMOTE untuk Mengatasi Imbalance Class dalam Klasifikasi Kepribadian MBTI Menggunakan Naive Bayes Classifier,” J. Teknol. Inf. Dan Ilmu Komput., vol. 10, hlm. 1493–1502, Des 2023, doi: 10.25126/jtiik.1077989.

M. Fachriza, “Analisis Sentimen Kalimat Depresi Pada Pengguna Twitter Dengan Naive Bayes, Support Vector Machine, Random Forest,” Anal. Sentimen Kalimat Depresi Pada Pengguna Twitter Dengan Naive Bayes Support Vector Mach. Random For., vol. 0, no. 0, Jul 2024, Diakses: 14 Desember 2025. [Daring]. Tersedia pada: https://digilib.esaunggul.ac.id/UEU-Undergraduate-20190801251/34308

L. Zhang, S. Zhao, Z. Yang, H. Zheng, dan M. Lei, “An artificial intelligence tool to assess the risk of severe mental distress among college students in terms of demographics, eating habits, lifestyles, and sport habits: an externally validated study using machine learning,” BMC Psychiatry, vol. 24, no. 1, hlm. 581, Agu 2024, doi: 10.1186/s12888-024-06017-2.

R. Damanhuri dan V. A. Husein, “Analisis Sentimen pada Ulasan Aplikasi Access by KAI Berbahasa Indonesia Menggunakan Word-Embedding dan Classical Machine Learning,” J. Masy. Inform., vol. 15, no. 2, hlm. 97–106, Nov 2024, doi: 10.14710/jmasif.15.2.62383.

A. Shabrina, A. G. Prathama, dan R. H. Ninin, “Persepsi Stigmatisasi Dan Intensi Pencarian Bantuan Kesehatan Mental Pada Mahasiswa S1,” J. Psikol., vol. 17, no. 1, hlm. 80, Jun 2021, doi: 10.24014/jp.v17i1.11399.

“Mental Health and Academic Success in College.” Diakses: 20 Februari 2026. [Daring]. Tersedia pada: https://www.degruyterbrill.com/document/doi/10.2202/1935-1682.2191/html

Downloads

Published

2026-02-28

Issue

Section

Articles