Predicting Student Depression using Machine Learning: A Comparative Study of Logistic Regression and Random Forest

Authors

  • Yijin Jiang

DOI:

https://doi.org/10.54097/dbj7g705

Keywords:

Depression; logistic regression; random forest; prediction model.

Abstract

Depression is a common mental health concern among university students, typically caused by academic and social demands. The purpose of this study is to investigate the efficacy of machine learning techniques in detecting depression in its early stages. To optimize model parameters, this research used a Kaggle dataset with 502 participants, rigorous data preprocessing, and a 10-fold cross-validation strategy. Two predictive models were created: logistic regression with elastic net regularization and random forest model. The results reveal that the logistic regression model obtained an accuracy of 98%, beating the random forest model’s 92% accuracy. At the same time, feature importance analysis highlighted academic pressure and suicidal ideation as significant predictors. These results highlight data-driven approaches as likely to improve early diagnosis and targeted intervention of mental health issues in universities. Thus, the research informs depression understanding in student communities, providing a comparative perspective to the effectiveness of various predictive models for guiding preventative and support measures.

Downloads

Download data is not yet available.

References

[1] Bernal-Morales B, Rodríguez-Landa J F, Pulido-Criollo F. Impact of anxiety and depression symptoms on scholar performance in high school and university students. In A fresh look at anxiety disorders. IntechOpen, 2015.

[2] Ibrahim A K, Kelly S J, Adams C E, et al. A systematic review of studies of depression prevalence in university students. Journal of psychiatric research, 2013, 47(3): 391-400.

[3] Deng Y, Cherian J, Khan N U N, et al. Family and academic stress and their impact on students' depression level and academic performance. Frontiers in psychiatry, 2022, 13: 869337.

[4] Mackenzie S, Wiegel J R, Mundt M, et al. Depression and suicide ideation among students accessing campus health care. American journal of orthopsychiatry, 2011, 81(1): 101.

[5] Pascoe M C, Hetrick S E, Parker A G. The impact of stress on students in secondary school and higher education. International journal of adolescence and youth, 2020, 25(1): 104-112.

[6] Shankar N L, Park C L. Effects of stress on students' physical and mental health and academic success. International Journal of School & Educational Psychology, 2016, 4(1): 5-9.

[7] McCloud T, Bann D. Financial stress and mental health among higher education students in the UK up to 2018: rapid review of evidence. J Epidemiol Community Health, 2019, 73(10): 977-984.

[8] Kempfer S S, Fernandes G C M, Reisdorfer E, et al. Epidemiology of depression in low income and low education adolescents: a systematic review and meta-analysis. Grant Med J, 2017, 2(04): 067-077.

[9] Li T M H, Li C T, Wong P W C, et al. Withdrawal behaviors and mental health among college students. Psicol Conductual, 2017, 25(1): 99-109.

[10] Roberts R E, Duong H T. The prospective association between sleep deprivation and depression among adolescents. Sleep, 2014, 37(2): 239-244.

[11] Ljungberg T, Bondza E, Lethin C. Evidence of the importance of dietary habits regarding depressive symptoms and depression. International journal of environmental research and public health, 2020, 17(5): 1616.

[12] Milne B J, Caspi A, Harrington H L, et al. Predictive value of family history on severity of illness: the case for depression, anxiety, alcohol dependence, and drug dependence. Archives of general psychiatry, 2009, 66(7): 738-747.

Downloads

Published

05-09-2025

How to Cite

Jiang, Y. (2025). Predicting Student Depression using Machine Learning: A Comparative Study of Logistic Regression and Random Forest. Highlights in Science, Engineering and Technology, 153, 125-132. https://doi.org/10.54097/dbj7g705