Prediction of gastrointestinal hemorrhage in cardiology inpatients using an interpretable XGBoost model

Yahui Li1, Xujie Wang2, Xuhui Liu3,3

  • 1Division of Cardiology, Department of Internal Medicine, Tongji Hospital, Tongji Medical College, Hubei Key Laboratory of Genetics and Molecular Mechanisms of Cardiological Disorders, Huazhong University of Science and Technology, 1095 Jiefang Ave, Wuhan, 430030, Hubei, China.

Scientific Reports
|July 12, 2025
PubMed

Insights

A new machine learning model accurately predicts gastrointestinal bleeding (GIB) risk in cardiology patients. Key predictors include hemoglobin, creatinine, and D-dimer, enabling early intervention and personalized prevention strategies.

Area of Science:

  • Cardiology
  • Medical Informatics
  • Machine Learning

Background:

  • Gastrointestinal bleeding (GIB) is a significant concern for cardiovascular patients, increasing morbidity and mortality.
  • Existing predictive models for GIB in this population often lack accuracy and interpretability.

Purpose of the Study:

  • To develop an interpretable and practical machine learning model for predicting GIB risk in cardiology inpatients.
  • To identify key predictors of GIB in this patient cohort.

Main Methods:

  • Retrospective analysis of electronic health records from 10,706 cardiology inpatients.
  • Development and evaluation of seven machine learning classifiers, with a focus on XGBoost.
  • Utilized SHapley Additive exPlanations (SHAP) for model interpretability.

Main Results:

  • The XGBoost model achieved an AUC of 0.995, accuracy of 0.975, sensitivity of 0.769, and specificity of 0.996 in the validation cohort.
  • Top predictors identified: hemoglobin, creatinine, D-dimer, NT-proBNP, glucose, white blood cell count, body weight, serum albumin, urea, and age.
  • SHAP analysis confirmed hemoglobin, creatinine, and D-dimer as primary risk contributors.

Conclusions:

  • The developed XGBoost model provides a highly accurate and interpretable tool for predicting GIB risk in cardiology inpatients.
  • This model can support clinical decision-making through early risk identification and the implementation of personalized prevention strategies.