Article
Machine Learning-Based Prediction of University Students’ Mental Health: Integrating Developmental and Psychosocial Factors in Higher Education Analytics
Abstract
Due to their impact on psychological well-being, educational engagement, and long-term educational outcomes, mental health problems among university students have received increasing attention. The goal of this research was to use machine learning algorithms to predict mental health conditions among university students and to assess how developmental, demographic, academic, and psychosocial factors affect those predictions. A publicly available dataset containing 101 university students was used to perform analyses using logistic regression, random forests, and gradient boosting algorithms, with the following variables included: age, gender, marital status, cumulative grade point average (CGPA), anxiety, panic attacks, and treatment-seeking behavior. The data were preprocessed, features were engineered, and an 80/20 train-test split was used to assess the predictive performance of the models. The results showed that gradient boosting achieved the highest accuracy (88%) in classifying targets, followed by random forest (84%) and logistic regression (76%), and the confusion matrix analyses further confirmed that the predictive models were stable, as evidenced by low false-positive and false-negative classifications. The most important predictors were anxiety and marital status; CGPA was a relatively weak predictor. Ensemble ML methods identified complex relationships in student mental health, and this study shows how to use these methods to provide an exploratory, predictive framework for early identification and screening of mental health issues, and to support strategies for students through data-informed decisions in universities.
Keywords
Mental Health, Machine Learning, Higher Education Analytics, Anxiety, Predictive Modeling
References
- [1] Arnett, J.J., 2000. Emerging adulthood: A theory of development from the late teens through the twenties. American Psychologist. 55(5), 469–480. DOI: https://doi.org/10.1037/0003-066X.55.5.469
- [2] Mahdavi, P., Valibeygi, A., Moradi, M., et al., 2023. Relationship between achievement motivation, mental health and academic success in university students. Community Health Equity Research & Policy. 43(3), 311–317. DOI: https://doi.org/10.1177/0272684X211025932
- [3] Morales-Rodríguez, F.M., Espigares-López, I., Brown, T., et al., 2020. The relationship between psychological well-being and psychosocial factors in university students. International Journal of Environmental Research and Public Health. 17(13), 4778. DOI: https://doi.org/10.3390/ijerph17134778
- [4] Bzdok, D., Krzywinski, M., Altman, N., 2018. Machine learning: Supervised methods. Nature Methods. 15(1), 5–6. DOI: https://doi.org/10.1038/nmeth.4551
- [5] Thieme, A., Belgrave, D., Doherty, G., 2020. Machine learning in mental health: A systematic review of the HCI literature to support the development of effective and implementable ML systems. ACM Transactions on Computer-Human Interaction. 27(5), 1–53. DOI: https://doi.org/10.1145/3398069
- [6] Auerbach, R.P., Mortier, P., Bruffaerts, R., et al., 2018. WHO world mental health surveys international college student project: Prevalence and distribution of mental disorders. Journal of Abnormal Psychology. 127(7), 623–638. DOI: https://doi.org/10.1037/abn0000362
- [7] Eisenberg, D., Golberstein, E., Hunt, J.B., 2009. Mental health and academic success in college. The BE Journal of Economic Analysis & Policy. 9(1), 1935–1682. DOI: https://doi.org/10.2202/1935-1682.2191
- [8] Richardson, M., Abraham, C., Bond, R., 2012. Psychological correlates of university students’ academic performance: A systematic review and meta-analysis. Psychological Bulletin. 138(2), 353–387. DOI: https://doi.org/10.1037/a0026838
- [9] Okita, D.O., 2025. Programmes for promoting university students’ well-being. In: Aloka, P.J.O. (Ed.). Using Positive Psychology Interventions to Promote Well-Being among Students in Higher-Education Institutions: Understanding Their Cognitive and Social Impact. Palgrave Macmillan: Cham, Switzerland. pp. 79–97. DOI: https://doi.org/10.1007/978-3-031-88793-2_5
- [10] Basysyar, F.M., Dwilestari, G., Purnamasari, A.I., 2024. Analysis student emotions and mental health on cumulative GPA using machine learning and SMOTE. Jurnal Ilmu Pengetahuan dan Teknologi Komputer. 10(2), 361–368. DOI: https://doi.org/10.33480/jitk.v10i2.5967
- [11] Saad, H., 2020. Use bagging algorithm to improve prediction accuracy for evaluation of worker performances at a production company. arXiv preprint. arXiv:2011.12343. DOI: https://doi.org/10.48550/arXiv.2011.12343
- [12] Muraina, I.O., 2021. Ideal dataset splitting ratios in machine learning algorithms: General concerns for data scientists and data analysts. In Proceedings of the 7th International Mardin Artuklu Scientific Research Conference, Mardin, Turkey, 10–12 December 2021; pp. 496–504.
- [13] Rengasamy, D., Mase, J.M., Kumar, A., et al., 2022. Feature importance in machine learning models: A fuzzy information fusion approach. Neurocomputing. 511, 163–174. DOI: https://doi.org/10.1016/j.neucom.2022.09.053
- [14] Cao, Y., Chen, R.C., Katz, A.J., 2024. Why is a small sample size not enough? The Oncologist. 29(9), 761–763. DOI: https://doi.org/10.1093/oncolo/oyae162
- [15] James, G., Witten, D., Hastie, T., et al., 2013. An Introduction to Statistical Learning: With Applications in R. Springer: New York, NY, USA. DOI: https://doi.org/10.1007/978-1-4614-7138-7
- [16] Abedin, T., Xu, H., Uddin, S., 2026. The impact of K selection in K‑fold cross-validation on bias and variance in supervised learning models. Scientific Reports. 16, 6084. DOI: https://doi.org/10.1038/s41598-026-37247-x
- [17] Shatte, A.B., Hutchinson, D.M., Teague, S.J., 2019. Machine learning in mental health: A scoping review of methods and applications. Psychological Medicine. 49(9), 1426–1448. DOI: https://doi.org/10.1017/S0033291719000151
- [18] Kumar, S., Machireddy, J.R., Sankaran, T., et al., 2025. Integration of machine learning and data science for optimized decision-making in computer applications and engineering. Journal of Information Systems Engineering and Management. 10(45s), 748–759. DOI: https://doi.org/10.52783/jisem.v10i45s.8990
- [19] Grabowska, A., Sondej, F., Senderecka, M., 2024. A machine learning study of anxiety-related symptoms and error-related brain activity. Journal of Cognitive Neuroscience. 36(5), 936–961. DOI: https://doi.org/10.1162/jocn_a_02126
- [20] Nordgreen, T., Rabbi, F., Torresen, J., et al., 2021. Challenges and possible solutions in cross-disciplinary and cross-sectorial research teams within the domain of e-mental health. Journal of Enabling Technologies. 15(4), 241–251. DOI: https://doi.org/10.1108/JET-03-2021-0013
- [21] Testa, D., 2012. Cross-disciplinary collaboration and health promotion in schools. Australian Social Work. 65(4), 535–551. DOI: https://doi.org/10.1080/0312407X.2011.645242
- [22] Jerotic, S., Ignjatovic, N., Maric, N.P., et al., 2024. A comparative study on mental disorder conceptualization: A cross-disciplinary analysis. Community Mental Health Journal. 60(4), 813–825. DOI: https://doi.org/10.1007/s10597-024-01240-3
- [23] Kuhn, M., Johnson, K., 2013. Applied Predictive Modeling. Springer: New York, NY, USA. DOI: https://doi.org/10.1007/978-1-4614-6849-3
- [24] McCarthy, R.V., McCarthy, M.M., Ceccucci, W., 2022. Applying Predictive Analytics: Finding Value in Data. Springer: Cham, Switzerland. DOI: https://doi.org/10.1007/978-3-030-83070-0
- [25] Toma, M., Wei, O.C., 2023. Predictive modeling in medicine. Encyclopedia. 3(2), 590–601. DOI: https://doi.org/10.3390/encyclopedia3020042