Journal of Engineering Science and Technology Management
The Prediction of Hospital Readmission in Diabetic Patients Using Random Forest, XGBoost, and Support Vector Machine with an Explainable AI Approach
By Zulfaqar Zul, Ridho Amanda Putra and Hadnan Hardiansyah Hardiansyah.
Abstract
Hospital readmission among patients with diabetes is an indicator of healthcare quality, treatment effectiveness, and hospitalization burden. Early prediction of readmission risk may support targeted interventions and reduce repeated hospital stays. This study developed prediction models using Random Forest, Extreme Gradient Boosting (XGBoost), and Support Vector Machine (SVM), with SHapley Additive exPlanations (SHAP) applied to interpret model predictions. The Diabetes 130-US Hospitals dataset comprised 101,766 medical records containing demographic characteristics, hospital visit history, laboratory results, diagnoses, and medication use. The outcome was defined as unplanned readmission within 30 days of discharge by recoding the original “<30,” “>30,” and “NO” categories. Data were divided into training and test sets at an 80:20 ratio using stratified sampling, preserving the class distribution of 11.16% readmitted and 88.84% not readmitted without resampling. Random Forest and XGBoost were trained on the full training set, whereas SVM used a stratified subsample of 10,000 training records because of computational constraints. All models were evaluated using the same test set. XGBoost achieved the best performance, with a balanced accuracy of 0.632 and ROC-AUC of 0.684. McNemar’s test indicated that its performance differed significantly from SVM but not from Random Forest. SHAP identified payer type, diagnosis categories, age group, prior inpatient history, and Clinical Risk Score as influential predictors. These findings demonstrate the feasibility of combining machine learning and explainable artificial intelligence for clinically interpretable readmission prediction. However, reliance on a single historical public dataset and the absence of external validation limit the model’s readiness for clinical deployment.






