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.
Copyrights © 2026