Predicting depression among men who have sex with men in Ghana using machine learning algorithms
Abdulzeid Yen Anafo,
LaRon E Nelson,
Leo Wilton,
Vincent Uwumboriyhie Gmayinaam and
Selasi Ocloo
PLOS Mental Health, 2025, vol. 2, issue 11, 1-16
Abstract:
Men who have sex with men (MSM) in Ghana face heightened risks of depression due to pervasive stigma, social exclusion, and legal discrimination. Despite this, depression remains underdiagnosed and undertreated in this population. This study applied seven tree-based machine learning (ML) models using tree-based classifiers: Decision Tree, Random Forest, Gradient Boosting, AdaBoost, XGBoost, LightGBM, and CatBoost to identify key psychosocial predictors of depression in a sample of 225 MSM aged 18–60 years. The dataset included sociodemographic variables, perceived stress (PSS), social isolation (internal and external), behavioural risk indicators, and stigma-related measures. After handling missing values, data were pre-processed with feature standardization and one-hot encoding. The Synthetic Minority Over-Sampling Technique was applied to address class imbalance. Model performance was evaluated using 5-fold cross-validation and metrics such as accuracy, precision, recall, F1 score, and ROC AUC. Among all models, Random Forest achieved the highest accuracy for the prediction of depression amongst MSM in Ghana. Feature importance analysis revealed that external social isolation (ExtSocialIso2), perceived stress (PSS14), and stigma due to same-sex behaviour (StigmaSSB9) were the most consistent predictors of depression. Variables related to resilience, gender non-conformity stigma, and sense of community belonging also contributed significantly. Depression among MSM in Ghana is closely linked to social isolation, stress, and identity-based stigma. Machine learning models, especially ensemble methods, can effectively identify individuals at risk. These findings underscore the need for culturally tailored mental health interventions and inclusive policies that address stigma and promote social support among MSM in Ghana.
Date: 2025
References: Add references at CitEc
Citations:
Downloads: (external link)
https://journals.plos.org//article?id=10.1371/journal.pmen.0000485 (text/html)
https://journals.plos.org//article/file?id=10.1371 ... 00485&type=printable (application/pdf)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:plo:pmen00:0000485
DOI: 10.1371/journal.pmen.0000485
Access Statistics for this article
More articles in PLOS Mental Health from Public Library of Science
Bibliographic data for series maintained by mentalhealth ().