An Interpretable XGBoost Model for Diabetes Prediction: Nested Cross-Validation, Calibration, and SHAP Analysis
Authors
Article Information
Publication Timeline
- Published
Abstract
Background: Diabetes mellitus is a major global health burden, and its early detection is essential for preventing serious complications. Machine learning, and eXtreme Gradient Boosting (XGBoost) in particular, performs strongly on routine clinical data; however, reported results are frequently optimistic because of hold-out evaluation and data leakage, and the resulting models are often difficult to interpret.
Objective: To develop and rigorously evaluate an interpretable XGBoost model for predicting the presence of diabetes from eight routine diagnostic measurements, using an unbiased, leakage-controlled evaluation design.
Methods: An openly available dataset of 1,168 patient records (771 non-diabetic and 397 diabetic; an approximately 66:34 class imbalance) with eight clinical features was analysed. Physiologically implausible zero values were treated as missing and imputed with the median inside a processing pipeline. Model selection and performance estimation were separated using a 5×5 nested cross-validation scheme, with all preprocessing confined to the training folds to prevent data leakage. Performance was assessed on out-of-fold predictions using accuracy, sensitivity, specificity, precision, F1 score, the area under the ROC curve (ROC-AUC), and the Brier score; probability calibration was examined; and the contribution of each feature was quantified with SHapley Additive exPlanations (SHAP).
Results: The model achieved an ROC-AUC of 0.823, an accuracy of 0.769, a specificity of 0.859, a sensitivity of 0.595, a precision of 0.684, an F1 score of 0.636, and a Brier score of 0.160. The near-diagonal calibration curve and low Brier score indicated that the predicted probabilities were well calibrated and could be interpreted as reliable risk estimates. SHAP analysis identified glucose, body mass index, and age as the most influential predictors, in agreement with established clinical risk factors for diabetes.
Conclusions: Under a leakage-controlled, unbiased evaluation, XGBoost provided moderate but trustworthy discrimination together with well-calibrated probabilities for diabetes prediction, while SHAP confirmed clinically plausible predictors. The comparatively conservative performance underscores the importance of nested cross-validation over simple hold-out splits for realistic model assessment. External validation and decision-threshold or class-imbalance strategies represent promising directions for future work.
Keywords
diabetes predictionXGBoostnested cross-validationSHAPmodel calibrationexplainable artificial intelligencemachine learningHow to Cite
Kucukakcali, Z., & Cicek, I. B. (2026). An Interpretable XGBoost Model for Diabetes Prediction: Nested Cross-Validation, Calibration, and SHAP Analysis. International Journal of Medical and All Body Health Research, 7(3), 168-174. https://doi.org/10.54660/IJMBHR.2026.7.3.168-174
Kucukakcali, Zeynep, and Ipek Balikci Cicek. "An Interpretable XGBoost Model for Diabetes Prediction: Nested Cross-Validation, Calibration, and SHAP Analysis." International Journal of Medical and All Body Health Research, vol. 7, no. 3, 2026, pp. 168-174. https://doi.org/10.54660/IJMBHR.2026.7.3.168-174.
Kucukakcali, Z. and Cicek, I. B. (2026) 'An Interpretable XGBoost Model for Diabetes Prediction: Nested Cross-Validation, Calibration, and SHAP Analysis', International Journal of Medical and All Body Health Research, 7(3), pp. 168-174. doi: 10.54660/IJMBHR.2026.7.3.168-174.
Kucukakcali Z, Cicek IB. An Interpretable XGBoost Model for Diabetes Prediction: Nested Cross-Validation, Calibration, and SHAP Analysis. International Journal of Medical and All Body Health Research. 2026;7(3):168-174. doi:10.54660/IJMBHR.2026.7.3.168-174
Similar Articles
- Comparative Diagnostic Performance of RIPASA, ALVARADO, and AIR Scoring Systems in Acute Appendicitis: A Retrospective Evaluation Using Traditional Metrics and XGBoost Algorithm Vol 6, Issue 2 (2025)
- Changing Demographic Trends, Indications and Clinical Outcomes of Keratoplasty: An Observational Study from a Tertiary Care Centre Vol 7, Issue 3 (2026)
- The Use of Optical Coherence Tomography for the Detection of Ocular Toxicity by Ethambutol in Newly Diagnosed Tuberculosis Patients Vol 7, Issue 3 (2026)
- Colchicine toxicity: Accidental Plant Poisoning with Colchicum Autumnale Resulting in Multiorgan Failure: A Case Report Vol 7, Issue 3 (2026)
- Beyond Binary Classification: A Comprehensive Survival Analysis and Calibration Assessment of the Heart Failure Clinical Records Datase Vol 7, Issue 3 (2026)
Find this Article on
Google Scholar Semantic Scholar OpenAlex Scilit Crossref ResearchGate BASEA newly published article may take a few days to appear on these services.