Machine Learning Models for Predicting in-Hospital Cardiac Arrest: A Comparative Analysis with Logistic Regression - Chang, Wei-Shan; Hsiao, Kai-Yuan; Lin, Lian-Yu; Chen, MingChih; Shia, Ben-Chang; Lin, Chung-Yu (International journal of general medicine, 2025)
To develop and compare multiple machine learning (ML) algorithms with traditional logistic regression for predicting in-hospital cardiac arrest (IHCA) using comprehensive electronic health record data, with the goal of improving early risk stratification beyond conventional early-warning scores and providing potential integration into hospital early warning systems for timely clinical intervention. We performed a retrospective case-control study at a large tertiary medical center, including 800 IHCA cases and 3,464 controls. Candidate predictors comprised demographics, comorbidities, vital signs, and laboratory measurements. Five models-logistic regression, decision tree, random forest, XGBoost, and multivariate adaptive regression splines (MARS)-were trained and validated. Performance was evaluated using area under the receiver operating characteristic curve (AUC), accuracy, sensitivity, specificity, and F1 score. XGBoost yielded strong discrimination and the highest accuracy (AUC 0.909; accuracy 0.883), while random forest showed comparable discrimination (AUC 0.910) with slightly lower accuracy (0.876). Logistic regression performed robustly but lower than ML models (AUC 0.895; accuracy 0.876). ML models consistently identified clinically meaningful predictors-including blood urea nitrogen, heart rate, and pre-existing heart failure-offering insights beyond traditional regression. Integrating ML approaches with conventional regression enhances IHCA risk prediction by capturing non-linear relationships and interactions while retaining the interpretability of regression. These approaches could strengthen hospital early-warning systems, enabling earlier detection and intervention, and ultimately improving patient outcomes.