Background: This study aims to develop accurate and interpretable machine learning models for the early prediction of Type 2 and Gestational Diabetes. The primary objective is to investigate how ensemble learning, data balancing, and explainable AI can be combined to enhance predictive performance, particularly in conditions of class imbalance and small sample sizes typical of clinical datasets. Methods: Fifteen machine learning models, including advanced ensemble methods such as Extra Trees Classifier (ETC), Light Gradient Boosting Machine (LightGBM), Random Forest (RF), and XGBoost, were evaluated. To address severe class imbalance, especially in the Gestational Diabetes dataset, three oversampling techniques were applied: Synthetic Minority Over-sampling Technique (SMOTE), SMOTETomek, and Adaptive Synthetic Sampling (ADASYN). Model performance was assessed using standard evaluation metrics across two publicly available datasets. SHapley Additive exPlanations (SHAP) were used to interpret model predictions and identify the most influential clinical features. Findings : For the Type 2 Diabetes dataset, ensemble models, most notably the Extra Trees Classifier, achieved the highest performance, demonstrating competitive results compared to approaches reported in the literature. In the Gestational Diabetes dataset, SMOTE-based augmentation combined with ensemble learning (RF-SMOTE, ETC-SMOTE, LightGBM-SMOTE) led to notable improvements in prediction accuracy within the evaluated datasets, showing consistent performance gains over baseline models and the considered machine learning and deep learning methods. SHAP analysis provided clinically meaningful explanations by highlighting the dominant predictors that influence model decisions. Interpretation : Integrating ensemble learning with targeted data balancing and model explainability yields robust, high-performing, and transparent models for diabetes prediction. The results demonstrate consistent and reliable performance within the evaluated datasets, particularly in imbalanced and limited-data scenarios, highlighting the effectiveness of the proposed framework and its potential suitability for real-world clinical decision support.
No takes yet. Share an insight, caveat, or question.
Harrou et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: