{"title":"使用可解释的XGBoost模型预测心脏病住院患者胃肠道出血。","authors":"Yahui Li, Xujie Wang, Xuhui Liu","doi":"10.1038/s41598-025-10906-1","DOIUrl":null,"url":null,"abstract":"<p><p>Gastrointestinal bleeding (GIB) occurs more frequently in cardiovascular patients than in the general population, significantly affecting morbidity and mortality. However, existing predictive models often lack sufficient accuracy and interpretability. We developed an interpretable and practical machine learning model to predict the risk of GIB in cardiology inpatients. This retrospective study analyzed electronic health records of 10,706 patients admitted to the Department of Cardiology at the Second Hospital of Lanzhou University from October 8, 2019, to October 30, 2024. Variables with > 30% missing data were excluded, leaving 35 potential predictors. The dataset was randomly split into a training cohort (80%, n = 9,356) and a test cohort (20%, n = 2,340). GIB occurred in 110 patients (1.03%). Ten variables were identified as the strongest predictors: hemoglobin (importance score: 0.16), creatinine (0.12), D-dimer (0.10), NT-proBNP (0.06), glucose (0.06), white blood cell count (0.06), body weight (0.06), serum albumin (0.04), urea (0.04), and age (0.04). Among seven machine learning classifiers, XGBoost performed best, with an AUC of 0.995 in the validation cohort. In the validation set, the model achieved an accuracy of 0.975, sensitivity of 0.769, and specificity of 0.996. SHapley Additive exPlanations (SHAP) analysis confirmed hemoglobin, creatinine, and D-dimer as the top contributors to GIB risk. The model demonstrated excellent calibration (Brier score = 0.016), and decision curve analysis supported its clinical utility across various risk thresholds. The XGBoost model offers high accuracy and interpretability in predicting GIB risk among cardiology inpatients. It holds promise for clinical decision support by enabling early risk identification and personalized prevention strategies.</p>","PeriodicalId":21811,"journal":{"name":"Scientific Reports","volume":"15 1","pages":"25240"},"PeriodicalIF":3.9000,"publicationDate":"2025-07-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12255804/pdf/","citationCount":"0","resultStr":"{\"title\":\"Prediction of gastrointestinal hemorrhage in cardiology inpatients using an interpretable XGBoost model.\",\"authors\":\"Yahui Li, Xujie Wang, Xuhui Liu\",\"doi\":\"10.1038/s41598-025-10906-1\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p><p>Gastrointestinal bleeding (GIB) occurs more frequently in cardiovascular patients than in the general population, significantly affecting morbidity and mortality. However, existing predictive models often lack sufficient accuracy and interpretability. We developed an interpretable and practical machine learning model to predict the risk of GIB in cardiology inpatients. This retrospective study analyzed electronic health records of 10,706 patients admitted to the Department of Cardiology at the Second Hospital of Lanzhou University from October 8, 2019, to October 30, 2024. Variables with > 30% missing data were excluded, leaving 35 potential predictors. The dataset was randomly split into a training cohort (80%, n = 9,356) and a test cohort (20%, n = 2,340). GIB occurred in 110 patients (1.03%). Ten variables were identified as the strongest predictors: hemoglobin (importance score: 0.16), creatinine (0.12), D-dimer (0.10), NT-proBNP (0.06), glucose (0.06), white blood cell count (0.06), body weight (0.06), serum albumin (0.04), urea (0.04), and age (0.04). Among seven machine learning classifiers, XGBoost performed best, with an AUC of 0.995 in the validation cohort. In the validation set, the model achieved an accuracy of 0.975, sensitivity of 0.769, and specificity of 0.996. SHapley Additive exPlanations (SHAP) analysis confirmed hemoglobin, creatinine, and D-dimer as the top contributors to GIB risk. The model demonstrated excellent calibration (Brier score = 0.016), and decision curve analysis supported its clinical utility across various risk thresholds. The XGBoost model offers high accuracy and interpretability in predicting GIB risk among cardiology inpatients. It holds promise for clinical decision support by enabling early risk identification and personalized prevention strategies.</p>\",\"PeriodicalId\":21811,\"journal\":{\"name\":\"Scientific Reports\",\"volume\":\"15 1\",\"pages\":\"25240\"},\"PeriodicalIF\":3.9000,\"publicationDate\":\"2025-07-12\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12255804/pdf/\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Scientific Reports\",\"FirstCategoryId\":\"103\",\"ListUrlMain\":\"https://doi.org/10.1038/s41598-025-10906-1\",\"RegionNum\":2,\"RegionCategory\":\"综合性期刊\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"MULTIDISCIPLINARY SCIENCES\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Scientific Reports","FirstCategoryId":"103","ListUrlMain":"https://doi.org/10.1038/s41598-025-10906-1","RegionNum":2,"RegionCategory":"综合性期刊","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"MULTIDISCIPLINARY SCIENCES","Score":null,"Total":0}
Prediction of gastrointestinal hemorrhage in cardiology inpatients using an interpretable XGBoost model.
Gastrointestinal bleeding (GIB) occurs more frequently in cardiovascular patients than in the general population, significantly affecting morbidity and mortality. However, existing predictive models often lack sufficient accuracy and interpretability. We developed an interpretable and practical machine learning model to predict the risk of GIB in cardiology inpatients. This retrospective study analyzed electronic health records of 10,706 patients admitted to the Department of Cardiology at the Second Hospital of Lanzhou University from October 8, 2019, to October 30, 2024. Variables with > 30% missing data were excluded, leaving 35 potential predictors. The dataset was randomly split into a training cohort (80%, n = 9,356) and a test cohort (20%, n = 2,340). GIB occurred in 110 patients (1.03%). Ten variables were identified as the strongest predictors: hemoglobin (importance score: 0.16), creatinine (0.12), D-dimer (0.10), NT-proBNP (0.06), glucose (0.06), white blood cell count (0.06), body weight (0.06), serum albumin (0.04), urea (0.04), and age (0.04). Among seven machine learning classifiers, XGBoost performed best, with an AUC of 0.995 in the validation cohort. In the validation set, the model achieved an accuracy of 0.975, sensitivity of 0.769, and specificity of 0.996. SHapley Additive exPlanations (SHAP) analysis confirmed hemoglobin, creatinine, and D-dimer as the top contributors to GIB risk. The model demonstrated excellent calibration (Brier score = 0.016), and decision curve analysis supported its clinical utility across various risk thresholds. The XGBoost model offers high accuracy and interpretability in predicting GIB risk among cardiology inpatients. It holds promise for clinical decision support by enabling early risk identification and personalized prevention strategies.
期刊介绍:
We publish original research from all areas of the natural sciences, psychology, medicine and engineering. You can learn more about what we publish by browsing our specific scientific subject areas below or explore Scientific Reports by browsing all articles and collections.
Scientific Reports has a 2-year impact factor: 4.380 (2021), and is the 6th most-cited journal in the world, with more than 540,000 citations in 2020 (Clarivate Analytics, 2021).
•Engineering
Engineering covers all aspects of engineering, technology, and applied science. It plays a crucial role in the development of technologies to address some of the world''s biggest challenges, helping to save lives and improve the way we live.
•Physical sciences
Physical sciences are those academic disciplines that aim to uncover the underlying laws of nature — often written in the language of mathematics. It is a collective term for areas of study including astronomy, chemistry, materials science and physics.
•Earth and environmental sciences
Earth and environmental sciences cover all aspects of Earth and planetary science and broadly encompass solid Earth processes, surface and atmospheric dynamics, Earth system history, climate and climate change, marine and freshwater systems, and ecology. It also considers the interactions between humans and these systems.
•Biological sciences
Biological sciences encompass all the divisions of natural sciences examining various aspects of vital processes. The concept includes anatomy, physiology, cell biology, biochemistry and biophysics, and covers all organisms from microorganisms, animals to plants.
•Health sciences
The health sciences study health, disease and healthcare. This field of study aims to develop knowledge, interventions and technology for use in healthcare to improve the treatment of patients.