Related Experiment Video
Updated: May 23, 2025

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Association of risk factors with mental illness in a rural community: insights from machine learning models
Firoj Al-Mamun1,2,3, Mohammed A Mamun1,2,3, Md Emran Hasan1,4
1CHINTA Research Bangladesh, Savar, Dhaka, Bangladesh.
Background:
Mental health conditions, particularly depression and anxiety, are highly prevalent and impose substantial health burdens globally. Despite advancements in machine learning, there is limited application of these methods in predicting common mental illnesses within community populations in low-resource settings.
Aims:
This study aims to examine the prevalence and associated risk factors of common mental illnesses collectively (depression and anxiety) in a rural Bangladeshi community using machine learning models.
Method:
This cross-sectional study surveyed 490 adults aged 18-59 in a rural Bangladeshi community. Depression and anxiety were assessed using the Patient Health Questionnaire (PHQ-2) and Generalised Anxiety Disorder (GAD-2) scales. Machine learning models, including Categorical Boosting, the support vector machine, the random forest and XGBoost (eXtreme Gradient Boosting), were trained on 80% of the data-set and tested on 20% to evaluate predictive accuracy, precision, F1 score, log-loss and area under the receiver operating characteristic curve (AUC-ROC).
Results:
Some 20.4% of participants experienced at least one common mental illness. Feature importance analysis identified house type, age group and educational status as the most significant predictors. SHAP (Shapley Additive exPlanations) values highlighted their influence on model outputs, and the XGBoost gain metric confirmed the importance of marital status and house type, with gains of 0.76 and 0.73, respectively. XGBoost delivered the best performance, achieving an F1 score of 71.01%, precision of 71.58%, accuracy of 71.15% and the lowest log-loss value of 0.56. The random forest had an accuracy of 78.21% and an AUC-ROC of 0.90.
Conclusions:
The findings of this study suggest targeted interventions addressing housing and social determinants could improve mental health outcomes in similar rural settings. Further studies should consider longitudinal data to explore causal relationships.
Related Concept Videos
Steps in Outbreak Investigation
Community Based Intervention
Foundations of Community Mental Health Programs
Central to the success of community-based interventions is the...
Factors Affecting Illness
For instance, risk factors are connected to illness,...
Psychological and Sociocultural Causes of Schizophrenia
Mechanistic Models: Compartment Models in Individual and Population Analysis
Models of Health Promotion and Illness Prevention II
The agent-host-environment model states that disease results...

