Mental health risk prediction in autoimmune patients in primary care: A class-sensitive machine learning approach
Abstract
Patients with autoimmune diseases are at increased risk of developing psychological conditions such as anxiety and depression. Timely detection of these mental health disorders is essential for effective intervention, yet remains difficult due to the overlap and subtle presentation of symptoms. In this study, we propose a machine learning (ML) framework for early prediction of anxiety and depression in autoimmune patients using routine clinical and demographic features in primary care. We develop an XGBoost-based model enhanced with custom loss functions specifically designed to handle class imbalance and semantic similarity between mental health outcomes. Experimental results demonstrate that the proposed penalty terms improve standard XGBoost performance in identifying minority classes and minimizing confusion between similar categories, by reaching a maximum statistically significant macro-Recall gain of 4.03% (p < 0.05) for the Logit Distance Exponential Penalty term. This work contributes to developing data-driven tools for mental health risk assessment, with potential applications in personalized care and digital screening for vulnerable clinical populations.
Fields of Study & Subjects
Machine Learning in Healthcare
Emotion and Mood Recognition
Tryptophan and brain disorders
Publication details
- Journal / source
- Smart Health
- Publisher
- Elsevier BV
- Volume
- 39
- Pages
- 100634–100634
- Publication date
- 16 January 2026
- Language
- EN