Explainable Stacked Ensemble for Gestational Diabetes Risk Prediction Using Routine Antenatal Care Data in Uganda
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Gestational diabetes mellitus (GDM) remains under-diagnosed in low-resource settings, where access to laboratory testing and specialist clinicians is limited. Early risk stratification using routinely collected antenatal data offers potential for scalable screening, but traditional clinical models often lack sensitivity and interpretability. This study develops and evaluates machine learning approaches for predicting GDM using 6,821 anonymised antenatal care records from Kawempe National Referral Hospital in Uganda. After preprocessing and outcome labelling, five supervised learning models: Logistic Regression, Decision Tree, Random Forest, XGBoost, and a Stacked Ensemble, were trained using Synthetic Minority Oversampling (SMOTE) and evaluated via 5-fold cross-validation. The Stacked Ensemble, Random Forest, and XGBoost models demonstrated near-perfect detection performance (accuracy, precision, recall, F1-score, ROC AUC, and PR AUC all = 1.000), while Logistic Regression achieved strong but lower discrimination (accuracy 94.1%, ROC AUC 0.991, PR AUC 0.929). Calibration curves, decision curve analysis, and lift profiles confirmed that ensemble models provided meaningful probability estimates and substantial net clinical benefit, capturing over 74% of true positive cases within the top 10–15% of ranked predictions. Explainability techniques, including feature importance, coefficient profiling, decision tree visualisation, and SHAP attribution, identified BMI, maternal age, MUAC, and systolic blood pressure as key contributors, aligning with established epidemiological evidence. These findings indicate that low-cost, routinely collected Antenatal Care (ANC) data can power highly accurate and interpretable AI-based GDM risk screening systems, offering utility for early referral and triage in resource-constrained maternal health environments. Future research should prioritise external validation across diverse clinical populations and integration into digital decision-support platforms for real-world deployment.