A machine learning framework developed using routine electronic health records from public clinics in Lusaka District, Zambia, predicted twelve-month health outcomes for people living with HIV but demonstrated marked variations in performance across different healthcare facilities. Researchers designed the predictive system to address common limitations in clinical decision support tools, including information leakage, evaluation restricted to training sites, and inadequate model interpretability.
The study evaluated records from 246,053 patients receiving care across six public health facilities. To assess real-world generalizability and prevent overestimation of accuracy, the investigative team trained the models on 171,547 patient records originating from four clinics and evaluated predictive performance on a distinct holdout cohort of 74,506 patient records drawn from two separate clinics.
Investigators trained the framework to predict three specific twelve-month clinical outcomes: recorded tuberculosis treatment, treatment interruption, and recorded unsuppressed viral load. To ensure clinical validity and avoid predictive leakage, all model predictors were constructed solely from patient data recorded and available on or before the designated index date.
The analytical architecture compared individual base models consisting of logistic regression, random forest, and XGBoost algorithms against a stacked ensemble model combining these approaches. Optimal decision operating thresholds were identified using an internal validation partition from the four training facilities, and discrimination was subsequently quantified using the area under the receiver operating characteristic curve and precision-recall curves alongside bootstrap confidence intervals and DeLong tests.
For predicting recorded tuberculosis treatment within twelve months, the stacked ensemble achieved moderate discrimination with an area under the receiver operating characteristic curve of 0.707 and a 95% confidence interval spanning from 0.703 to 0.710. When evaluated at the preselected operating threshold, the model yielded a sensitivity of 0.68 and a precision of 0.56, while decision curve analysis indicated net clinical benefit at threshold probabilities of 0.27 or higher.
Ranking metrics were relatively stronger for the remaining two outcomes, yielding an area under the receiver operating characteristic curve of 0.839 with a 95% confidence interval of 0.822 to 0.856 for treatment interruption, and 0.778 with a 95% confidence interval of 0.763 to 0.794 for unsuppressed viral load. Despite these ranking scores, low disease incidence resulted in operating precision of only 0.05 for treatment interruption and 0.09 for unsuppressed viral load, offering only small net clinical benefits at low decision thresholds.
Significant heterogeneity emerged when assessing model discrimination across the two independent validation facilities, with tuberculosis prediction accuracy shifting from an area under the receiver operating characteristic curve of 0.649 in one clinic to 0.754 in the other. Furthermore, an ablation analysis revealed that the apparent predictive importance attributed to patient education for rare outcomes stemmed from an indicator tracking missing values rather than true educational attainment levels.
The authors concluded that while the machine learning framework demonstrated moderate utility for tracking tuberculosis treatment, it provided only low-precision screening signals for rarer clinical endpoints. Because machine learning signals partly capture local documentation habits rather than purely biological phenomena, researchers emphasized that prospective calibrated evaluations and substantial data quality enhancements remain essential before deploying such algorithms in clinical settings.
Subject of Research: Machine learning prediction of clinical HIV outcomes using routine electronic health records in Zambia
Article Title: An explainable multi-outcome machine learning framework for personalized clinical decision support in HIV care using routine electronic health records in Zambia
Article References: Phiri, J., Zimba, A., Njovu, C., Kashoka, A., Chiboma, I., Chiwele, M., Sinkala, T., Mutale, J., & Lumpa, M. (2026). An explainable multi-outcome machine learning framework for personalized clinical decision support in HIV care using routine electronic health records in Zambia. BMC Medical Informatics and Decision Making. https://doi.org/10.1186/s12911-026-04014-x
Image Credits: AI Generated
DOI: 10.1186/s12911-026-04014-x
Keywords: Machine Learning, HIV Care, Electronic Health Records, Zambia, Clinical Decision Support, Tuberculosis, Treatment Interruption, Viral Load Suppression, Lusaka District, Stacked Ensemble, Random Forest, XGBoost, Logistic Regression, SHAP Explanations, Model Calibration, Decision Curve Analysis
News Source: Teresa Odom. (November 30, 2026). Zambian HIV Machine Learning Model Shows Mixed Predictive Value Across Clinics. Scienmag.



