Skip to content
Open access

A machine learning–driven and explainable prediction model for in-hospital mortality in patients with diabetes mellitus and congestive heart failure: integrating XGBoost and SHAP approaches

Oct 2026 · Frontiers in Public Health · 0 citations · 41 references

Abstract

Patients with congestive heart failure (CHF) and type 2 diabetes mellitus (T2DM) are at elevated risk of in-hospital mortality, particularly in intensive care units (ICUs). Conventional scoring systems may not fully capture the clinical complexity of such comorbidities. This study aimed to construct an interpretable machine learning model to predict in-hospital mortality in this high-risk group. A retrospective study included 573 ICU patients with CHF and T2DM admitted to three hospitals in Henan, China (Jan 2025–Jun 2026). Seven predictors—body mass index (BMI), myocardial infarction, mild liver disease, SOFA score, LODS score, white blood cell (WBC) count, and serum creatinine—were identified via stepwise logistic regression. XGBoost and four other machine learning algorithms (KNN, SVM, CatBoost, AdaBoost) were trained and evaluated. Model performance was assessed using AUC, accuracy, sensitivity, specificity, and F1-score. SHAP (SHapley Additive exPlanations) was used to interpret XGBoost predictions. XGBoost achieved the best performance (AUC 0.917, sensitivity 86.8%, specificity 96.6%, accuracy 74.8%). SHAP analysis indicated that mild liver disease, LODS score, BMI, WBC count, and SOFA score were the top contributors, jointly explaining over 77% of the predictive power. Myocardial infarction, liver disease, elevated WBC, and higher SOFA/LODS scores increased mortality risk, while higher BMI and serum creatinine were protective—supporting the obesity paradox and sarcopenia hypothesis. An XGBoost model with SHAP interpretation provides accurate, explainable prediction of in-hospital mortality in ICU patients with CHF and T2DM, offering a valuable tool for early risk stratification and clinical decision-making.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.