Development and implementation of explainable AI-based machine learning models for predicting hospital stay and treatment costs in cardiovascular patients

Cardiovascular disease (CVD) remains the leading cause of global morbidity and mortality, with substantial economic implications for healthcare systems. Among hospitalized CVD patients, procedures such as angioplasty and coronary artery bypass grafting (CABG) are associated with prolonged lengths of stay (LOS) and elevated treatment costs, underscoring the need for robust predictive tools to support clinical and administrative decision-making. Therefore, this study aimed to develop and validate machine learning (ML) models to predict hospital LOS and treatment costs for cardiovascular inpatients using real-world clinical data. This applied, retrospective predictive modeling study was conducted in 2024 at specialized cardiovascular clinic of a tertiary teaching hospital in Tehran, Iran. A cohort of 7685 adult inpatients who underwent angioplasty or CABG between 2022 and 2023 was analyzed. Eight regression-based ML algorithms were developed to predict four outcomes: hospital LOS, patient out-of-pocket (OOP), insurer payment, and total treatment cost. Model performance was evaluated using the coefficient of determination (R<sup>2</sup>), root mean squared error (RMSE), and mean absolute error (MAE). SHAP was applied to the best-performing model to enable both global and local interpretability. Finally, a dual-platform clinical decision support application (web-based and desktop) was developed. XGBoost consistently outperformed other models across all prediction tasks. On the test set, it achieved R<sup>2</sup> values of 0.7802 for LOS, 0.8473 for patient OOP, 0.8946 for insurer payment, and 0.6437 for total cost. SHAP analysis revealed LOS, intervention type, age, and comorbidities as key predictors. The deployed application demonstrated real-time utility in generating personalized predictions based on patient characteristics. This study presents a comprehensive, explainable, and clinically implementable ML framework for predicting LOS and treatment costs in cardiovascular care. By integrating high-performing models with explainable AI and real-world application, this approach offers a scalable solution for enhancing hospital resource planning and optimizing patient outcomes. Future work should focus on external validation of the models across multiple hospitals and healthcare systems to enhance their generalizability. Additionally, integrating broader clinical and socioeconomic variables may further improve the predictive performance and expand the applicability of the developed decision support tool.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-12-28
DOI
https://doi.org/10.1038/s41598-025-33005-7
Primary Topic
Machine Learning in Healthcare
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Development and implementation of explainable AI-based machine learning models for predicting hospital stay and treatment costs in cardiovascular patients

Masoud Arabfard, Maryam Yaghoubi, Maryam Moshkani Farahani, Mohammad Amiri-Ara et al.
Scientific Reports
Machine Learning in Healthcare
article

Development and implementation of explainable AI-based machine learning models for predicting hospital stay and treatment costs in cardiovascular patients

Masoud Arabfard, Maryam Yaghoubi, Maryam Moshkani Farahani, Mohammad Amiri-Ara, Parisa Mehdizadeh, Alireza Banaye Yazdipour
article en

Abstract

Cardiovascular disease (CVD) remains the leading cause of global morbidity and mortality, with substantial economic implications for healthcare systems. Among hospitalized CVD patients, procedures such as angioplasty and coronary artery bypass grafting (CABG) are associated with prolonged lengths of stay (LOS) and elevated treatment costs, underscoring the need for robust predictive tools to support clinical and administrative decision-making. Therefore, this study aimed to develop and validate machine learning (ML) models to predict hospital LOS and treatment costs for cardiovascular inpatients using real-world clinical data. This applied, retrospective predictive modeling study was conducted in 2024 at specialized cardiovascular clinic of a tertiary teaching hospital in Tehran, Iran. A cohort of 7685 adult inpatients who underwent angioplasty or CABG between 2022 and 2023 was analyzed. Eight regression-based ML algorithms were developed to predict four outcomes: hospital LOS, patient out-of-pocket (OOP), insurer payment, and total treatment cost. Model performance was evaluated using the coefficient of determination (R<sup>2</sup>), root mean squared error (RMSE), and mean absolute error (MAE). SHAP was applied to the best-performing model to enable both global and local interpretability. Finally, a dual-platform clinical decision support application (web-based and desktop) was developed. XGBoost consistently outperformed other models across all prediction tasks. On the test set, it achieved R<sup>2</sup> values of 0.7802 for LOS, 0.8473 for patient OOP, 0.8946 for insurer payment, and 0.6437 for total cost. SHAP analysis revealed LOS, intervention type, age, and comorbidities as key predictors. The deployed application demonstrated real-time utility in generating personalized predictions based on patient characteristics. This study presents a comprehensive, explainable, and clinically implementable ML framework for predicting LOS and treatment costs in cardiovascular care. By integrating high-performing models with explainable AI and real-world application, this approach offers a scalable solution for enhancing hospital resource planning and optimizing patient outcomes. Future work should focus on external validation of the models across multiple hospitals and healthcare systems to enhance their generalizability. Additionally, integrating broader clinical and socioeconomic variables may further improve the predictive performance and expand the applicability of the developed decision support tool.

Scientific ReportsVol. 16(1)
Baqiyatallah University of Medical Sciences (IR), Mashhad University of Medical Sciences (IR)
Good health and well-being
Openalex Percentile: Top 18%
Machine Learning in Healthcare
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.