A Machine Learning Approach for Predicting 30-Day Hospital Readmission in Patients with Diabetes
Abstract
1. Introduction
1.1. Hospital Readmission as a Healthcare Challenge
1.2. Predictive Modeling in Healthcare
1.3. Machine Learning for Hospital Readmission Prediction
1.4. Study Objective and Contributions
- A robust evaluation framework using nested cross-validation to provide unbiased performance estimation.
- Probability calibration of model outputs using Platt scaling to improve the reliability of predicted readmission risk.
- Clinical utility assessment through decision curve analysis (DCA) and clinical impact curves (CICs) to evaluate the real-world usefulness of the model.
- Model interpretability using SHAP analysis combined with stability analysis to identify consistent predictors of hospital readmission.
- Comparative evaluation of multiple machine learning models, including Logistic Regression, Random Forest, XGBoost, and LightGBM, to identify the most appropriate base classifier for calibration and interpretability analysis.
2. Related Work
3. Materials and Methods
3.1. Dataset Description and Preprocessing
3.1.1. Data Source and Study Population
3.1.2. Outcome Definition
- “<30” (readmitted within 30 days),
- “>30” (readmitted after 30 days),
- “NO” (no readmission).
- Target = 1: readmitted within 30 days,
- Target = 0: otherwise.
- Non-readmitted: 90,409 encounters (88.84%).
- Readmitted within 30 days: 11,357 encounters (11.16%).
3.1.3. Data Cleaning and Missing Value Handling
3.1.4. Feature Engineering
Age Transformation
Diagnostic Code Grouping
- Circulatory diseases;
- Respiratory diseases;
- Digestive diseases;
- Diabetes-related conditions;
- Injury;
- Cancer;
- Other.
Administrative Variable Consolidation
- Admission type: Emergency, Urgent, Elective, Other.
- Discharge group: Home, Transfer, Expired, Other.
- Admission source group: Emergency Room, Physician Referral, Transfer, Other.
High-Cardinality Reduction
3.1.5. Final Modeling Dataset
3.2. Model Development and Validation Strategy
3.2.1. Preprocessing Pipeline
3.2.2. Handling Class Imbalance
3.2.3. Nested Cross-Validation
3.2.4. Final Model Training and Probability Calibration
3.2.5. Bootstrap Resampling Procedure
3.2.6. Clinical Utility Evaluation
Decision Curve Analysis
- Treat-All (intervening on all patients),
- Treat-None (no intervention).
Clinical Impact Curve
- The number of individuals classified as high risk at each threshold,
- The number of true readmissions among those classified high risk.
Threshold-Based Clinical Metrics
- Sensitivity (recall)
- Specificity
- Positive Predictive Value (PPV)
- Negative Predictive Value (NPV)
- Number of high-risk patients identified per 1000
- Number of true readmissions per 1000
3.2.7. Model Explainability and Stability Analysis
Global Feature Importance
- The relative magnitude of feature importance,
- The directionality of effect (whether higher feature values increase or decrease predicted readmission risk),
- The distribution of feature contributions across the cohort.
Stability Analysis of SHAP Rankings
4. Results
4.1. Discriminative Performance: Nested Cross-Validation
4.2. Final Model Performance and Calibration
4.3. Bootstrap Confidence Intervals
4.4. Risk Stratification
- Low-risk group: approximately 4–5%;
- Medium-risk group: approximately 9–10%;
- High-risk group: approximately 18–19%.
4.5. Decision Curve Analysis
4.6. Threshold-Based Performance Analysis
4.7. Clinical Impact Curve
- Approximately 500 patients per 1000 were classified as high risk,
- Approximately 80 true readmissions per 1000 were correctly identified.
4.8. Model Explainability and Stability
- Number of diagnoses,
- Length of hospital stay,
- Age,
- Number of medications.
4.9. Precision–Recall Performance
4.10. Clinical Utility of the Prediction Model
5. Discussion
5.1. Comparison with Previous Studies
5.2. Strengths of the Study
5.3. Clinical Implications
5.4. Limitations
5.5. Future Directions
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Samsky, M.D.; Ambrosy, A.P.; Youngson, E.; Liang, L.; Kaul, P.; Hernandez, A.F.; Peterson, E.D.; McAlister, F.A. Trends in Readmissions and Length of Stay for Patients Hospitalized With Heart Failure in Canada and the United States. JAMA Cardiol. 2019, 4, 444–453. [Google Scholar] [CrossRef]
- Fekri, O.; Manukyan, E.; Klazinga, N. Associations between hospital deaths (HSMR), readmission and length of stay (LOS): A longitudinal assessment of performance results and facility characteristics of teaching and large-sized hospitals in Canada between 2013–2014 and 2017–2018. BMJ Open 2021, 11, e041648. [Google Scholar] [CrossRef]
- Ong, K.L.; Stafford, L.K.; McLaughlin, S.A.; Boyko, E.J.; Vollset, S.E.; Smith, A.E.; Dalton, B.E.; Duprey, J.; Cruz, J.A.; Hagins, H.; et al. Global, regional, and national burden of diabetes from 1990 to 2021, with projections of prevalence to 2050: A systematic analysis for the Global Burden of Disease Study 2021. Lancet 2023, 402, 203–234. [Google Scholar] [CrossRef] [PubMed]
- American Diabetes Association Professional Practice Committee; ElSayed, N.A.; Aleppo, G.; Bannuru, R.R.; Bruemmer, D.; Collins, B.S.; Ekhlaspour, L.; Gaglia, J.L.; Hilliard, M.E.; Johnson, E.L.; et al. 2. Diagnosis and Classification of Diabetes: Standards of Care in Diabetes—2024. Diabetes Care 2024, 47, S20–S42. [Google Scholar] [CrossRef]
- Nguyen, O.K.; Makam, A.N.; Clark, C.; Zhang, S.; Xie, B.; Velasco, F.; Amarasingham, R.; Halm, E.A. Predicting All-Cause Readmissions Using Electronic Health Record Data From the Entire Hospitalization: Model Development and Comparison. J. Hosp. Med. 2016, 11, 473. [Google Scholar] [CrossRef] [PubMed]
- Mahmoudi, E.; Kamdar, N.; Kim, N.; Gonzales, G.; Singh, K.; Waljee, A.K. Use of electronic medical records in development and validation of risk prediction models of hospital readmission: Systematic review. BMJ 2020, 369, m958. [Google Scholar] [CrossRef]
- Shmueli, G. To Explain or to Predict? Stat. Sci. 2010, 25, 289–310. [Google Scholar] [CrossRef]
- Obermeyer, Z.; Emanuel, E.J. Predicting the Future—Big Data, Machine Learning, and Clinical Medicine. N. Engl. J. Med. 2016, 375, 1216–1219. [Google Scholar] [CrossRef]
- Walsh, C.G.; Sharman, K.; Hripcsak, G. Beyond discrimination: A comparison of calibration methods and clinical usefulness of predictive models of readmission risk. J. Biomed. Inform. 2017, 76, 9–18. [Google Scholar] [CrossRef]
- Varma, S.; Simon, R. Bias in error estimation when using cross-validation for model selection. BMC Bioinform. 2006, 7, 91. [Google Scholar] [CrossRef]
- Watson, D.S.; Krutzinna, J.; Bruce, I.N.; Griffiths, C.E.; McInnes, I.B.; Barnes, M.R.; Floridi, L. Clinical applications of machine learning algorithms: Beyond the black box. BMJ 2019, 364, l886. [Google Scholar] [CrossRef] [PubMed]
- Mishra, V.; Tanniru, M.R.; Sreedharan, J. Prediction of 30-day readmission in diabetes management using Machine learning. Comput. Biol. Med. 2025, 195, 110616. [Google Scholar] [CrossRef]
- da Silva, N.C.; Albertini, M.K.; Backes, A.R.; Pena, G.D.G. Machine learning for hospital readmission prediction in pediatric population. Comput. Methods Programs Biomed. 2024, 244, 107980. [Google Scholar] [CrossRef]
- Okolie, A.; Okolie, D.; Obunadike, C.; Ekweli, D.; Nwuke, P.; Abdul-Waliyyu, B.; Alumona, P. Machine Learning Approaches for Predicting 30-Day Hospital Readmissions: Evidence from Massachusetts Healthcare Data. World J. Adv. Res. Rev. 2025, 28, 914–929. [Google Scholar] [CrossRef]
- Emi-Johnson, O.G.; Nkrumah, K.J. Predicting 30-Day Hospital Readmission in Patients With Diabetes Using Machine Learning on Electronic Health Record Data. Cureus 2025, 17, e82437. [Google Scholar] [CrossRef] [PubMed]
- Liu, V.B.; Sue, L.Y.; Wu, Y. Comparison of machine learning models for predicting 30-day readmission rates for patients with diabetes. J. Med. Artif. Intell. 2024, 7, 23. [Google Scholar] [CrossRef]
- Li, X.; Liu, S.; Yu, D.; Zhang, Y.; Liu, X. Predicting 30-Day Hospital Readmission in Medicare Patients Insights from an LSTM Deep Learning Model. In 2024 3rd International Conference on Cloud Computing, Big Data Application and Software Engineering (CBASE); IEEE: Piscataway, NJ, USA, 2024; pp. 61–65. [Google Scholar] [CrossRef]
- Shang, Y.; Jiang, K.; Wang, L.; Zhang, Z.; Zhou, S.; Liu, Y.; Dong, J.; Wu, H. The 30-days hospital readmission risk in diabetic patients: Predictive modeling with machine learning classifiers. BMC Med. Inform. Decis. Mak. 2021, 21, 57. [Google Scholar] [CrossRef] [PubMed]
- Strack, B.; DeShazo, J.P.; Gennings, C.; Olmo, J.L.; Ventura, S.; Cios, K.J.; Clore, J.N. Impact of HbA1c measurement on hospital readmission rates: Analysis of 70,000 clinical database patient records. BioMed Res. Int. 2014, 2014, 781670. [Google Scholar] [CrossRef]
- Sisk, R.; Sperrin, M.; Peek, N.; van Smeden, M.; Martin, G.P. Imputation and missing indicators for handling missing data in the development and deployment of clinical prediction models: A simulation study. Stat. Methods Med. Res. 2023, 32, 1461–1477. [Google Scholar] [CrossRef]
- Digitale, J.; Franzon, D.; Pletcher, M.J.; McCulloch, C.E.; Gennatas, E.D. Methods for Addressing Missingness in Electronic Health Record Data for Clinical Prediction Models: Comparative Evaluation. JMIR Med. Inform. 2025, 13, e79307. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; Association for Computing Machinery: New York, NY, USA, 2016; pp. 785–794. [Google Scholar] [CrossRef]
- Vickers, A.J.; Elkin, E.B. Decision curve analysis: A novel method for evaluating prediction models. Med. Decis. Mak. 2006, 26, 565–574. [Google Scholar] [CrossRef] [PubMed]
- Lundberg, S.; Lee, S.-I. A Unified Approach to Interpreting Model Predictions. Adv. Neural Inf. Process. Syst. 2017, 30, 4766–4775. [Google Scholar]




| Variable | Missing (%) | Action Taken |
|---|---|---|
| weight | 96.86% | Removed |
| max_glu_serum | 94.75% | Retained—imputed as “Unknown” |
| A1Cresult | 83.28% | Retained—imputed as “Unknown” |
| medical_specialty | 49.08% | Retained—imputed as “Unknown” |
| payer_code | 39.56% | Removed |
| race | 2.23% | Retained—imputed as “Unknown” |
| diag_3 | 1.40% | Retained—imputed as “Unknown” |
| diag_2 | 0.35% | Retained—imputed as “Unknown” |
| diag_1 | 0.02% | Retained—imputed as “Unknown” |
| Variable | Description |
|---|---|
| Dataset Name | Diabetes 130-US Hospitals (1999–2008) |
| Source | UCI Machine Learning Repository |
| Number of Hospitals | 130 |
| Total Encounters | 101,766 |
| Study Population | Hospitalized patients diagnosed with diabetes mellitus |
| Prediction Task | 30-day hospital readmission |
| Positive Class (Readmitted < 30 days) | 11,357 (11.16%) |
| Negative Class | 90,409 (88.84%) |
| Class Imbalance Ratio | Approximately 1:8 |
| Final Number of Predictors | 55 |
| Model | ROC-AUC |
|---|---|
| Logistic Regression | 0.657 |
| Random Forest | 0.650 |
| XGBoost | 0.664 |
| LightGBM | 0.660 |
| Stacking | 0.665 |
| Metric | Value |
|---|---|
| Nested Cross-Validation ROC–AUC | 0.664 |
| Full-dataset AUC (post-calibration retraining) | 0.688 |
| Brier Score | 0.094 |
| PR–AUC | 0.215 |
| F1 Score (minority class) | 0.27 |
| Sensitivity (10% threshold) | 0.723 |
| Specificity (10% threshold) | 0.530 |
| PPV (10% threshold) | 0.162 |
| NPV (10% threshold) | 0.938 |
| Predicted High Risk per 1000 | 497.9 |
| True Readmissions per 1000 | 80.6 |
| Threshold | Sensitivity | Specificity | PPV | NPV | High Risk per 1000 |
|---|---|---|---|---|---|
| 0.05 | 1.000 | 0.073 | 0.119 | 1.000 | 934.8 |
| 0.10 | 0.881 | 0.524 | 0.189 | 0.972 | 521.0 |
| 0.15 | 0.570 | 0.839 | 0.308 | 0.940 | 206.5 |
| 0.20 | 0.264 | 0.967 | 0.501 | 0.913 | 58.9 |
| 0.25 | 0.108 | 0.994 | 0.707 | 0.899 | 17.1 |
| 0.30 | 0.038 | 0.999 | 0.886 | 0.892 | 4.8 |
| Study | Dataset/Population | Methods | Evaluation Strategy | Reported Performance |
|---|---|---|---|---|
| Mishra et al. | 352 patients from a diabetes specialty clinic | Logistic Regression, Decision Tree, Random Forest, XGBoost | Train–test split | RF AUC = 0.94; Precision = 0.84; Recall = 0.87; F1 = 0.85 |
| Silva et al. | 9080 pediatric hospitalized patients | Logistic Regression, Decision Tree, Random Forest, Gradient Boosting, XGBoost | Train/test with cross-validation | AUC = 0.814; Sensitivity = 0.81; Specificity = 0.66 |
| Awe et al. | Massachusetts statewide hospital dataset | Ridge Regression, Random Forest, Gradient Boosting | Standard train/test evaluation | Gradient Boosting R2 ≈ 0.81 |
| Emi-Johnson et al. | UCI Diabetes 130-US Hospitals dataset (101,766 records) | Logistic Regression, Random Forest, XGBoost, Deep Neural Network | Train/test evaluation | XGBoost AUC = 0.667 |
| Liu et al. | UCI Diabetes dataset (101,766 encounters) | RF, XGBoost, SVM, KNN, Naïve Bayes, AdaBoost, MLP, LSTM | Train/test split with SMOTE | RF Accuracy = 0.88; F1 = 0.83 |
| Shang et al. | Health Facts diabetes dataset (>100,000 records) | Random Forest, Naïve Bayes, Tree Ensemble | 80/20 train/test split | AUC ≈ 0.661 |
| Li et al. | MIMIC-III database (Medicare patients) | LSTM deep learning | Train/test evaluation | AUC ≈ 0.70 |
| Proposed Study | UCI Diabetes dataset (101,766 encounters; 130 hospitals) | Logistic Regression, RF, XGBoost, LightGBM, Stacking | Nested cross-validation + calibration + bootstrap + DCA | AUC = 0.664 (nested CV), calibrated AUC = 0.688; Brier = 0.094 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Salim, S.S.; Ibrahim, A.A. A Machine Learning Approach for Predicting 30-Day Hospital Readmission in Patients with Diabetes. Healthcare 2026, 14, 1185. https://doi.org/10.3390/healthcare14091185
Salim SS, Ibrahim AA. A Machine Learning Approach for Predicting 30-Day Hospital Readmission in Patients with Diabetes. Healthcare. 2026; 14(9):1185. https://doi.org/10.3390/healthcare14091185
Chicago/Turabian StyleSalim, Safaa Saad, and Abdullahi Abdu Ibrahim. 2026. "A Machine Learning Approach for Predicting 30-Day Hospital Readmission in Patients with Diabetes" Healthcare 14, no. 9: 1185. https://doi.org/10.3390/healthcare14091185
APA StyleSalim, S. S., & Ibrahim, A. A. (2026). A Machine Learning Approach for Predicting 30-Day Hospital Readmission in Patients with Diabetes. Healthcare, 14(9), 1185. https://doi.org/10.3390/healthcare14091185

