Mental Health Detection using Advanced Machine Learning
Abstract
There are a number of factors that can impact on students' wellbeing, such as academic workload, financial concerns, sleep patterns, social support, lifestyle and other factors. This research presents the web application MindScope Lab, which is based on machine learning algorithms and was designed to illustrate how simulated mental health-related risk patterns can be identified in student profiles. A synthetic dataset of 30,000 student records was generated with attributes based on the students' demographics, academic, wellbeing, lifestyle and support. The data comprises age, gender, department, CGPA, PHQ-9 score, anxiety score, academic stress, financial stress, sleep duration, sleep quality, social support, physical activity, family history, counselling history. The dataset was split in 80:20 stratified fashion and a Random Forest classifier was trained on the same. The model obtained a high accuracy of 96.92% for unseen synthetic test data. The trained pipeline was then integrated into a web application built using Flask that would take in a fake student profile from a user and give them a lower-risk pattern and guidance or a higher-risk pattern and guidance. The application was kept alive by a GitHub repository and deployed as a web service. The project illustrates the complete process of synthesizing the data, preprocessing, building a machine-learning model, testing it, developing a web-interface, and deploying it. The underlying data and target labels are synthetic data, and the system is for academic and technical demonstration only. It is not a medical diagnostic system, clinical screening tool or a substitute for mental health services.