A Prediction System for Early Identification of Students at Risk of Mental Health Issues

Ratnakirti Roy *

Department of MCA, Acharya Institute of Technology, Bengaluru, India.

Shaikh Adnan Shaikh Arif

Department of MCA, Acharya Institute of Technology, Bengaluru, India.

*Author to whom correspondence should be addressed.


Abstract

Mental health among university students in India is a critical public health concern, with studies indicating that over 37% of students exhibit symptoms of moderate to severe distress, profoundly impacting academic success and leading to high dropout rates. This chapter details the design, implementation, and evaluation of the Mental Health Risk Prediction System (MHRPS), a proactive, data-driven software solution developed to address this challenge. The MHRPS leverages machine learning to analyse a holistic set of student data—encompassing academic performance, behavioural engagement, and self-reported psychological metrics from instruments like the PHQ-9 and GAD-7. The system's data pipeline, built entirely in R (version 4.5.1), uses the Synthetic Minority Over-sampling Technique (SMOTE) to address class imbalance, a common problem in health data. It then employs a fine-tuned random forest model to classify students into 'Low', 'Medium', or 'High' risk categories. The resulting model achieved 99.87% accuracy and an Area Under the Curve (AUC) approaching 1.0, demonstrating a robust ability to distinguish between risk levels. Though this performance is contextualised within the study's methodology. Analysis revealed that direct self-reporting on items like self-harm thoughts and standardised questionnaire scores were the most powerful predictors. Actionable insights are presented via an interactive R Shiny dashboard, providing counsellors with individualised risk profiles. The entire workflow, from daily data synchronisation with Google Sheets to monthly model retraining, is fully automated using the Windows Task Scheduler. Deployed on a standard Windows PC using an entirely open-source software stack, the MHRPS is designed as an economically and technically feasible solution for Indian universities, offering a powerful tool to foster a more supportive and mentally healthy academic environment.

Keywords: Mental health, predictive analytics, machine learning, student wellness, Indian Universities, random forest


How to Cite

Roy, R., & Arif, S. A. S. (2026). A Prediction System for Early Identification of Students at Risk of Mental Health Issues. Machine Learning for the Real World: Applications and Insights, 1–24. https://doi.org/10.9734/bpi/mono/978-81-999106-5-2/CH1