Major Depressive Disorder (MDD) is a significant global health burden that contributes to disability and reduced quality of life. Its impact extends beyond individuals, placing emotional, social, and economic strain on families and healthcare systems worldwide. Despite its prevalence, MDD remains widely misunderstood, with limited mental health literacy and persistent stigma often preventing individuals from seeking help. This research explored the prediction of MDD utilising social media data via Natural Language Processing (NLP), Machine Learning (ML), and explainable Machine Learning (xML) techniques. The research aimed at identifying depressive indicators on X (formerly Twitter) and developing interpretable models for depression risk detection. The study’s methodology followed the Cross-Industry Standard Process for Data Mining (CRISP-DM) framework to ensure a systematic approach to data analysis. Data was collected via X’s API and processed using regex-based noise removal, normalisation, tokenisation, and lemmatisation. Symptoms were mapped to DSM-5-TR criteria at the post-level, with user-level MDD risk assessed based on symptom persistence over a two-week period. Risk levels were classified as No Risk, Monitor, and High Risk to facilitate early intervention. Six ML models were trained and tested, while the Synthetic Minority Over-sampling Technique (SMOTE) was applied to mitigate class imbalance. The dataset was partitioned into training and testing sets using an 80:20 split. ML models were evaluated, and the Extreme Gradient Boosting model outperformed the others. Extreme Gradient Boosting achieved an accuracy of 0.979, F1-score of 0.970, and ROC-AUC of 0.996, surpassing benchmark results reported in prior studies. Explainability techniques, such as LIME and tree-based feature importance, enhance model transparency and clinical interpretability. Depressed mood consistently emerged as the highest-weighted predictor across different models. The findings highlight the value of aligning ML models with validated diagnostic frameworks to improve trustworthiness and reduce false positives. Future research can expand beyond text-based analysis by incorporating multimodal features to broaden diagnostic depth.
Mabodi et al. (Fri,) studied this question.