Comparative machine learning for prediction of probable depression among people living with HIV in a rural Ghanaian antiretroviral therapy programme: development, internal validation and SHAP-based interpretation

Abstract Background Depressive symptoms are common among people living with HIV (PLHIV) and are associated with poorer antiretroviral therapy (ART) adherence and viral suppression. In rural settings, routine symptom screening may be constrained by counsellor workload and limited specialist mental health capacity. This study developed and internally evaluated ten supervised machine-learning (ML) models for identifying PHQ-9-defined probable depression among PLHIV attending ART clinics in Kadjebi District, Ghana. Methods A facility-based cross-sectional dataset of 264 adults receiving ART was analysed. Probable depression was defined as a Patient Health Questionnaire-9 (PHQ-9) score of 10 or above. Fifty-two predictors were engineered from sociodemographic, HIV-clinical, tuberculosis-service, physical-health, psychosocial, stigma and health-system variables; the nine PHQ-9 items were excluded from predictors. Data were partitioned 80:20 with stratification. Imputation and, where required, standardisation were fitted using the training partition, and SMOTE was applied only to the training data. Ten algorithms were tuned using five-fold cross-validation within the training partition. Performance on the untouched held-out test set was treated as the primary split-sample internal validation, with 5-fold x 4-repeat cross-validation of the training partition used as a secondary stability analysis. Performance metrics included AUC, sensitivity, specificity, precision, F1 score, Cohen's kappa, Brier score and calibration slope. Interpretability used permutation importance and SHapley Additive exPlanations (SHAP); decision-curve analysis was exploratory. Results PHQ-9-defined probable depression was present in 100 of 264 participants (37.9%). Random Forest was selected by the training-set cross-validation results. On the held-out test set, it achieved an AUC of 0.870, accuracy of 77.4%, sensitivity of 80.0%, specificity of 75.8%, F1 score of 0.727, Cohen's kappa of 0.536 and Brier score of 0.137. Its secondary repeated-cross-validation AUC was 0.893 (SD 0.041). Differences in cross-validated AUC among the leading algorithms were small relative to fold-to-fold variability, and no formal pairwise superiority testing was performed. Permutation importance and SHAP consistently highlighted comfort disclosing psychological difficulty, belief system, counselling and tailored mental-health service availability, perceived healthcare access and quality, sex, and perceived HIV impact. Exploratory decision-curve analysis suggested potential net benefit of model-guided PHQ-9 administration; at a threshold of 0.40, 48.9% of attendees would receive the PHQ-9 while 94% of PHQ-9-positive cases would be identified. This calculation concerns PHQ-9 administrations only and does not quantify total workflow burden. At the PHQ-9 > = 5 sensitivity threshold, Random Forest had a secondary cross-validated AUC of 0.911. Conclusion Random Forest showed promising discrimination for PHQ-9-defined probable depression in this small, single-district development study, but the findings remain proof-of-concept. Relational and service-related variables contributed strongly to prediction. Threshold analyses suggest that risk stratification could reduce the number of PHQ-9 administrations, but total counselling burden and safety were not established. External validation, development of a more parsimonious routine-workflow model, and prospective evaluation are required before clinical use; a prediction model should not replace assessment of suicide or self-harm risk.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-13
DOI
https://doi.org/10.21203/rs.3.rs-11154327/v1
Primary Topic
HIV/AIDS Research and Interventions
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Comparative machine learning for prediction of probable depression among people living with HIV in a rural Ghanaian antiretroviral therapy programme: development, internal validation and SHAP-based interpretation

Abdulzeid Yen Anafo, Patrick Elorm Djissem, Alfred Kwesi Manyeh, Vincent Uwumboriyhie Gmayinaam et al.
3 links
Research Square
HIV/AIDS Research and Interventions
preprint

Comparative machine learning for prediction of probable depression among people living with HIV in a rural Ghanaian antiretroviral therapy programme: development, internal validation and SHAP-based interpretation

Abdulzeid Yen Anafo, Patrick Elorm Djissem, Alfred Kwesi Manyeh, Vincent Uwumboriyhie Gmayinaam, David Naboare, Georgina Oduro Yeboah, Edem Kagbetor Kodzo
preprint en

Abstract

Abstract Background Depressive symptoms are common among people living with HIV (PLHIV) and are associated with poorer antiretroviral therapy (ART) adherence and viral suppression. In rural settings, routine symptom screening may be constrained by counsellor workload and limited specialist mental health capacity. This study developed and internally evaluated ten supervised machine-learning (ML) models for identifying PHQ-9-defined probable depression among PLHIV attending ART clinics in Kadjebi District, Ghana. Methods A facility-based cross-sectional dataset of 264 adults receiving ART was analysed. Probable depression was defined as a Patient Health Questionnaire-9 (PHQ-9) score of 10 or above. Fifty-two predictors were engineered from sociodemographic, HIV-clinical, tuberculosis-service, physical-health, psychosocial, stigma and health-system variables; the nine PHQ-9 items were excluded from predictors. Data were partitioned 80:20 with stratification. Imputation and, where required, standardisation were fitted using the training partition, and SMOTE was applied only to the training data. Ten algorithms were tuned using five-fold cross-validation within the training partition. Performance on the untouched held-out test set was treated as the primary split-sample internal validation, with 5-fold x 4-repeat cross-validation of the training partition used as a secondary stability analysis. Performance metrics included AUC, sensitivity, specificity, precision, F1 score, Cohen's kappa, Brier score and calibration slope. Interpretability used permutation importance and SHapley Additive exPlanations (SHAP); decision-curve analysis was exploratory. Results PHQ-9-defined probable depression was present in 100 of 264 participants (37.9%). Random Forest was selected by the training-set cross-validation results. On the held-out test set, it achieved an AUC of 0.870, accuracy of 77.4%, sensitivity of 80.0%, specificity of 75.8%, F1 score of 0.727, Cohen's kappa of 0.536 and Brier score of 0.137. Its secondary repeated-cross-validation AUC was 0.893 (SD 0.041). Differences in cross-validated AUC among the leading algorithms were small relative to fold-to-fold variability, and no formal pairwise superiority testing was performed. Permutation importance and SHAP consistently highlighted comfort disclosing psychological difficulty, belief system, counselling and tailored mental-health service availability, perceived healthcare access and quality, sex, and perceived HIV impact. Exploratory decision-curve analysis suggested potential net benefit of model-guided PHQ-9 administration; at a threshold of 0.40, 48.9% of attendees would receive the PHQ-9 while 94% of PHQ-9-positive cases would be identified. This calculation concerns PHQ-9 administrations only and does not quantify total workflow burden. At the PHQ-9 > = 5 sensitivity threshold, Random Forest had a secondary cross-validated AUC of 0.911. Conclusion Random Forest showed promising discrimination for PHQ-9-defined probable depression in this small, single-district development study, but the findings remain proof-of-concept. Relational and service-related variables contributed strongly to prediction. Threshold analyses suggest that risk stratification could reduce the number of PHQ-9 administrations, but total counselling burden and safety were not established. External validation, development of a more parsimonious routine-workflow model, and prospective evaluation are required before clinical use; a prediction model should not replace assessment of suicide or self-harm risk.

Research Square
University of Health and Allied Sciences (GH), University of Mines and Technology (GH)
Good health and well-being
HIV/AIDS Research and Interventions
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon