<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" "https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" article-type="research-article" dtd-version="1.2" xml:lang="en">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">IJMABHR</journal-id>
<journal-title-group><journal-title>International Journal of Medical and All Body Health Research</journal-title><abbrev-journal-title>IJMABHR</abbrev-journal-title></journal-title-group>
<issn pub-type="epub">2582-8940</issn>
<publisher><publisher-name>Anfo Publication House</publisher-name></publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">521</article-id>
<article-id pub-id-type="doi">10.54660/IJMBHR.2026.7.3.168-174</article-id>
<title-group><article-title>An Interpretable XGBoost Model for Diabetes Prediction: Nested Cross-Validation, Calibration, and SHAP Analysis</article-title></title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes"><name><surname>Kucukakcali</surname><given-names>Zeynep</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<contrib contrib-type="author"><name><surname>Cicek</surname><given-names>Ipek Balikci</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<aff id="aff1"><label>1</label>Inonu University Faculty of Medicine, Department of Biostatistics and Medical Informatics, 44280, Malatya, Turkey</aff>
</contrib-group>
<pub-date publication-format="electronic" date-type="pub"><day>05</day><month>08</month><year>2026</year></pub-date>
<volume>7</volume>
<issue>3</issue>
<fpage>168</fpage>
<lpage>174</lpage>
<history>
<date date-type="received"><day>07</day><month>06</month><year>2026</year></date>
<date date-type="accepted"><day>06</day><month>07</month><year>2026</year></date>
</history>
<permissions><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by-nc-sa/4.0/?utm"><license-p>CC BY-NC-SA 4.0</license-p></license></permissions>
<self-uri xlink:href="https://www.allmedicaljournal.com/article/521/an-interpretable-xgboost-model-for-diabetes-prediction-nested-cross-validation-calibration-and-shap"/>
<self-uri content-type="pdf" xlink:href="https://www.allmedicaljournal.com/article/521/download"/>
<abstract><p>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.
 </p></abstract>
<kwd-group kwd-group-type="author"><kwd>diabetes prediction</kwd><kwd>XGBoost</kwd><kwd>nested cross-validation</kwd><kwd>SHAP</kwd><kwd>model calibration</kwd><kwd>explainable artificial intelligence</kwd><kwd>machine learning</kwd></kwd-group>
</article-meta>
</front>
<back><ref-list><title>References</title>
<ref id="R1"><label>1</label><mixed-citation>Genitsaridi I, Salpea P, Salim A, Sajjadi SF, Tomic D, James S, et al. 11th edition of the IDF Diabetes Atlas: global, regional, and national diabetes prevalence estimates for 2024 and projections for 2050. Lancet Diabetes Endocrinol. 2026;14(2):149-56.</mixed-citation></ref>
<ref id="R2"><label>2</label><mixed-citation>Teufel F, Orgutsova K, Genitsaridi I, Carrillo-Larco RM, Varghese JS, Marcus ME, et al. Global, regional, and national estimates of undiagnosed diabetes in adults: findings from the 2025 IDF Diabetes Atlas. Diabetes Care. 2026;49(3):490-6.</mixed-citation></ref>
<ref id="R3"><label>3</label><mixed-citation>Masood S, Al-Bashrawi MA, Khan MA, Dwivedi YK. From data to diagnosis: a systematic review on AI-driven approaches to diabetes prediction. Artif Intell Rev. 2026;59(3):103.</mixed-citation></ref>
<ref id="R4"><label>4</label><mixed-citation>Kiran M, Xie Y, Anjum N, Ball G, Pierscionek B, Russell D. Machine learning and artificial intelligence in type 2 diabetes prediction: a comprehensive 33-year bibliometric and literature analysis. Front Digit Health. 2025;7:1557467.</mixed-citation></ref>
<ref id="R5"><label>5</label><mixed-citation>Smith JW, Everhart JE, Dickson WC, Knowler WC, Johannes RS. Using the ADAP learning algorithm to forecast the onset of diabetes mellitus. Proc Annu Symp Comput Appl Med Care. 1988 Nov 9:261-5.</mixed-citation></ref>
<ref id="R6"><label>6</label><mixed-citation>Chen T, Guestrin C. XGBoost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2016. p. 785-94.</mixed-citation></ref>
<ref id="R7"><label>7</label><mixed-citation>Li W, Peng Y, Peng K. Diabetes prediction model based on GA-XGBoost and stacking ensemble algorithm. PLoS One. 2024;19(9):e0311222.</mixed-citation></ref>
<ref id="R8"><label>8</label><mixed-citation>Varma S, Simon R. Bias in error estimation when using cross-validation for model selection. BMC Bioinformatics. 2006;7:91.</mixed-citation></ref>
<ref id="R9"><label>9</label><mixed-citation>Cawley GC, Talbot NL. On over-fitting in model selection and subsequent selection bias in performance evaluation. J Mach Learn Res. 2010;11:2079-107.</mixed-citation></ref>
<ref id="R10"><label>10</label><mixed-citation>Lundberg SM, Lee SI. A unified approach to interpreting model predictions. In: Advances in Neural Information Processing Systems. 2017;30.</mixed-citation></ref>
<ref id="R11"><label>11</label><mixed-citation>Lundberg SM, Erion G, Chen H, DeGrave A, Prutkin JM, Nair B, et al. From local explanations to global understanding with explainable AI for trees. Nat Mach Intell. 2020;2(1):56-67.</mixed-citation></ref>
<ref id="R12"><label>12</label><mixed-citation>Hernesto C. Predicting diabetes from tracking medical records [dataset]. Mendeley Data. Version 3. 2020. doi:10.17632/nxnty5g7y6.3.</mixed-citation></ref>
<ref id="R13"><label>13</label><mixed-citation>Demirel Tatli Ş, Aytekin K, Agraz M. Enhanced diabetes prediction using novel additive-multiplicative neural networks: a comprehensive machine learning analysis of the PIMA Indians dataset. medRxiv. 2025:2025.09.20.25336250.</mixed-citation></ref>
<ref id="R14"><label>14</label><mixed-citation>Nassiwa F, Zeng J. Evaluating traditional machine learning models for predicting diabetes onset using the Pima Indians dataset. SSRN. 2022. Available from: SSRN 4878052.</mixed-citation></ref>
<ref id="R15"><label>15</label><mixed-citation>Shams MY, Tarek Z, Elshewey AM. A novel RFE-GRU model for diabetes classification using PIMA Indian dataset. Sci Rep. 2025;15(1):982.</mixed-citation></ref>
<ref id="R16"><label>16</label><mixed-citation>Van Calster B, McLernon DJ, van Smeden M, Wynants L, Steyerberg EW. Calibration: the Achilles heel of predictive analytics. BMC Med. 2019;17(1):230.</mixed-citation></ref>
<ref id="R17"><label>17</label><mixed-citation>Liang X, Song W, Yang W, Yue Z. Enhancing diabetes risk assessment through Bayesian networks: an in-depth study on the Pima Indian population. Endocr Metab Sci. 2025;17:100212.</mixed-citation></ref>
</ref-list></back>
</article>