Answers are grounded in this paper and cite their sources.
HIV testing is essential for HIV diagnosis, treatment, and prevention, but testing history varies across sub-Saharan Africa. This study evaluated supervised machine-learning models for predicting history of HIV testing among women aged 15–49 years using recent Demographic and Health Survey (DHS) data from 13 sub-Saharan African countries. A pooled sample of 213,169 women was analyzed after removal of 336 confirmed duplicate respondent records. Seven supervised machine-learning algorithms were evaluated using stratified 80:20 random holdout validation, leave-one-country-out (LOCO) validation, and supplementary five-fold primary sampling unit (PSU) group-disjoint validation. Model performance was assessed using discrimination, classification, and calibration metrics. XGBoost predictions were interpreted using feature importance and SHAP analysis. Overall, 111,666 women (52.4%) reported having ever been tested for HIV, with country-specific prevalence ranging from 17.5% in Madagascar to 94.9% in Lesotho. In random holdout validation, XGBoost achieved the highest area under the receiver operating characteristic curve (AUC) (0.923; 95% CI: 0.920–0.925), with an accuracy of 0.835 and Brier score of 0.112. In LOCO validation, XGBoost and gradient boosting achieved the highest macro-averaged AUC (0.850). For XGBoost, macro-averaged accuracy, sensitivity, specificity, and Brier score were 0.705, 0.777, 0.722, and 0.201, respectively. Excluding country as a predictor reduced the macro-averaged AUC to 0.824. In supplementary XGBoost PSU group-disjoint validation, the mean of the 13 country-specific AUC estimates was 0.865 (SD 0.044), while the mean Brier score was 0.111 (SD 0.043). Literacy, contraceptive use, country, living children, STI awareness, age, and education were among the influential predictors. Machine-learning models demonstrated good predictive performance in the pooled analytical sample, although performance was lower when evaluated in countries excluded from model development, indicating limitations in geographic transportability. Predictive performance varied across countries. Supplementary PSU-disjoint validation also provided additional evidence of within-country predictive performance across different sampling clusters, although performance and calibration varied between countries. Further temporal and external validation is needed before considering implementation in HIV testing programs. Predictive feature importance should not be interpreted causally.
No takes yet. Share an insight, caveat, or question.
Temesgen Gebeyehu Wondmeneh (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: