Machine Learning Prediction of Heart Failure Readmissions Authors: Vishal Goel, Liam Scanlon, Kristina Lambrakis, Allister Lim, Sriram Rao, Malanka Lankaputhra, Johan Verjans, Ehsan Khan, Dion Stub, Jonathon Fanning, Andrew Lin, Derek Chew Published: 2026 ABSTRACT BackgroundHeart failure (HF) readmissions remain common and costly, yet existing prediction models show limited clinical utility, particularly at the time of emergency department (ED) presentation.ObjectivesThis study aimed to develop and evaluate machine learning (ML) models to predict 12-month HF readmission among patients presenting to EDs with suspected cardiac conditions.MethodsThis was a subanalysis of a cluster randomized clinical trial (n = 14,131) across 12 South Australia EDs (enrolled April-December 2023), which included patients with symptoms warranting high-sensitivity cardiac troponin T testing who were subsequently followed up for 12 months for HF readmission. The data set was randomly split into training (70%) and test (30%) sets. Four ML algorithms were compared with logistic regression. Features with >25% missing data were excluded. Model performance was evaluated using the area under the receiver operating characteristic curve (AUC).ResultsOf 14,131 ED patients (mean age 61 years; 49% female), 808 (5.71%) were readmitted for HF at a median of 83 days (IQR: 27–178). In the test set, an eXtreme Gradient Boosting (XGB) model (AUC: 0.861; 95% CI: 0.847-0.875) outperformed logistic regression for the prediction of HF readmission (AUC: 0.846; 95% CI: 0.828-0.861; P = 0.015). AUCs for other ML models were 0.845 (random forest), 0.851 (least absolute shrinkage and selection operator), and 0.842 (neural networks). The Brier score for XGB was 0.151, demonstrating good model calibration.ConclusionsAn XGB-based ML model accurately predicted 12-month HF readmission following ED presentation and outperformed traditional regression methods, supporting its potential role in early risk stratification and targeted preventive care. Heart failure (HF) remains a major global public health challenge contributing to substantial morbidity and mortality, as well as health system resource utilization. It is estimated that over 37 million individuals worldwide are living with HF, with resulting costs to the health care system annually estimated at USD $108 billion globally.1 Currently, HF accounts for approximately 1.5% of all hospital admissions each year within Australia2 and is a leading cause for hospital readmission within 30 days of discharge, with health care demands only anticipated to increase as a result of our aging population.3 Recognizing that hospital readmissions in HF within short time frames from a prior admission are often avoidable, public health systems such as those in Australia have not only introduced this measure as a clinical quality indicator but have also introduced hospital reimbursement penalties where HF readmissions occur within 30 days of hospital discharge.4 Improved risk stratification remains central to reducing HF readmissions and the associated health care burden. At present, this remains challenging in clinical practice due to the diversity of the medical workforce involved in the care of patients with or at risk of HF, with regard to both specialty training and experience. In an increasingly digital health environment, where data are now commonly electronically captured, novel predictive training methods leveraging experience from an ever increasing quantum of prior data, now represent a unique opportunity to support clinical decision-making to improve outcomes in HF. Despite advances in risk prediction, existing models for HF outcomes remain limited by modest performance, restricted generalizability, and a predominant focus on patients with established HF.5,6 In clinical practice, a key unmet need is the ability to identify patients at risk of future HF readmission at the point of first hospital contact, particularly in the emergency department (ED), where diagnostic uncertainty and time constraints limit risk stratification. Prior machine learning (ML) approaches have largely been developed in selected HF populations or rely on specialized data inputs, limiting their applicability in routine care settings.7 Accordingly, this study aimed to develop and compare ML models using routinely collected clinical and biochemical data available at ED presentation to predict subsequent HF readmission (Central Illustration). By enabling time-dependent, patient-level risk estimation within a heterogeneous population with suspected cardiac conditions, this approach seeks to provide a scalable framework for early risk stratification and targeted intervention.8Central IllustrationA Machine Learning Model to Predict Heart Failure Readmissions: Insights From a Multicenter Emergency Department TrialArea under the receiver operating characteristic curve (AUC), eXtreme Gradient Boosting (XGB), least absolute shrinkage and selection operator (LASSO). Abbreviations as in Figures 2 and 3. A Machine Learning Model to Predict Heart Failure Readmissions: Insights From a Multicenter Emergency Department Trial Area under the receiver operating characteristic curve (AUC), eXtreme Gradient Boosting (XGB), least absolute shrinkage and selection operator (LASSO). Abbreviations as in Figures 2 and 3. Methods Study design and population This study is a subanalysis of data from a cluster randomized clinical trial evaluating artificial intelligence (AI)–based clinical decision support for patients presenting to EDs with suspected cardiac conditions, known as re-engineering the clinical approach to suspected cardiac chest pain assessment in the emergency department by expediting research evidence to practice using artificial intelligence (RAPIDx AI). The RAPIDx AI trial has been described elsewhere.9 In brief, 6 metropolitan and 6 rural EDs in South Australia were randomized to receive either AI-based clinical decision support or the current standard of care for participants presenting to hospital with suspected cardiac conditions who were receiving high-sensitivity troponin testing. The AI-based clinical decision support provided information on troponin interpretation (ie diagnostic classification) per the Fourth Universal Definition of Myocardial Infarction (MI), 30-day likelihood of death and MI, as well as guidance on clinical care. This cluster randomized trial enrolled 14,131 participants, and clinical outcomes are being evaluated over 12 months, which includes HF readmission as an outcome. This subanalysis of the RAPIDx AI trial used the data available at December 31, 2024, to predict HF readmission with the available clinical data in the ED using 5 ML methods. The methods section is reported according to the TRIPOD statement.10 This subanalysis is approved by the Southern Adelaide Clinical Human Research Ethics Committee (Ref no: 272.20). Pathology and clinical data Within South Australia, all public hospitals use the same pathology service; hence, all pathology data in RAPIDx AI were able to be deterministically linked. Patient comorbidities and demographic data were collected during the RAPIDx AI trial through data linkage of electronic health record (EHR) data, including diagnostic codes in accordance with the International Classification of Diseases, version 10, Australian Modification. Comorbidities were identified via 5-year look back, where absence of a primary or secondary International Classification of Diseases, version 10, Australian Modification code was defined as absence of the given comorbidity. Key pathology data captured included high-sensitivity cardiac troponin T, serum albumin, hemoglobin, C-reactive protein, white blood cell count, serum creatinine, and estimated glomerular filtration rate. Candidate features were selected based on established clinical relevance to HF outcomes, availability at ED presentation, and data completeness. Assessment of clinical outcomes Clinical outcomes in the RAPIDx AI study were evaluated through a combination of blinded clinical endpoint adjudication and coded data. Blinded endpoint adjudication was undertaken by a qualified cardiologist using all available clinical data. Clinical endpoints captured include cardiovascular mortality, all-cause mortality, MI (types 1, 2, 4, and 5), and unplanned hospital admission for nonelective coronary revascularization, HF, cerebrovascular accidents, atrial and ventricular arrhythmias, pulmonary embolism, and aortic dissection. Model development We selected 5 standard supervised ML methods for structured data: eXtreme Gradient Boosting (XGB), random forest (RF), neural network (NN), least absolute shrinkage and selection operator(LASSO), and multivariate logistic regression. XGB is a type of gradient-boosted decision tree algorithm that combines multiple smaller decision trees into a single strong classifier. The NN algorithm consisted of multiple interconnected layers of neurons feeding forward into a final output neuron, with an aim to learn complex patterns from the input data. LASSO regression is a regularized regression approach that incorporates a penalty to the log-likelihood function with the goal of shrinking imprecise coefficients toward 0. RF is a supervised ensemble learning method that builds many decision trees to predict the outcome of interest. To ensure all features contributed equally to the training process, the data set was normalized through scaling resulting in even distributions of input attributes. Balanced class weights were used to handle class imbalance. There were 45 features incorporating key demographic, clinical, and biochemical characteristics included to create all models to predict HF representation (Supplemental Table 1). To address the issue of missing data, features with >25% missing data were excluding from analysis (Supplemental Table 2), and the remaining missing values were substituted with the median of the corresponding feature. Training All data set splitting and cross-validation were performed at the patient level, with each individual appearing in only one partition to prevent data leakage between training and test sets. The ML models were trained on 70% of the cohort (9,891 patients) using repeated 10-fold cross-validation. Stratification of events was used to ensure a balance between the folds. Bayesian optimization search was used in the ML models to find the optimal combination of hyperparameters.11 For XGB, this included depth of trees, child weights, gamma, and learning rate, and for the NN model, this included number of layers, neurons, dropout rates, and optimizer types (Supplemental Table 3). Evaluation The predictive performance of the trained models was evaluated on the 30% held-out test set (4,240 patients). The primary measure of performance was the area under the receiver operating characteristic curve (AUC). Comparison of AUCs was performed according to the method of Delong et al.12 To generate distinct clinical risk groups, Youden's J statistic (J = sensitivity + specificity − 1)13 was used to determine the optimal cutoff for the highest performed ML model. Kaplan-Meier curves representing the time-to-event probabilities for HF readmission were generated based on this cutoff value, with patients classified as high vs low risk. Feature importance for XGB was evaluated using the SHapley Additive exPlanations (SHAP) method.14 The SHAP value measures each feature’s marginal impact or weight in the model for an individual, in comparison to the average model prediction. For the subgroup analysis, a nested XGB model was evaluated for the prediction of HF readmission when known HF was removed as a feature variable. Statistical analysis Continuous variables were summarized as median (IQR) or mean (IQR), as appropriate, and compared using Welch’s t-test. Categorical variables were presented as counts and proportions and compared using the chi-squared or Fisher exact test, as appropriate. We reported the following test performance statistics for each of the models with CIs within the overall testing data set: AUC, sensitivity, specificity, negative predictive value, and positive predictive value. ML performance metrics including F1 (ie, the harmonic mean of precision and recall) and the Brier score (a quadratic scoring rule in which the squared differences between actual binary outcomes and predicted probabilities are calculated and lower values indicate higher overall accuracy) were also reported. A P value of <0.05 was considered statistically significant. All statistical analyses including training of ML models were performed using Python 3.0 and the Statsmodels library. Results Patient characteristics Between April 15 and December 31, 2023, 16,560 patients across 12 participating EDs were identified and provided the opportunity to opt out. A total of 14,659 individuals did not opt out, of whom 14,131 (96.4%) were successfully linked to administrative data sets and comprised the final analysis cohort. Complete 12-month follow-up was achieved for all participants through administrative data linkage, with no loss to follow-up. Within the cohort, 808 individuals (5.7%) experienced a HF readmission within 12 months, 1,012 (7.2%) died without a preceding HF readmission (competing risk), and 12,311 (87.1%) remained free from the primary endpoint at 12 months. Baseline characteristics are displayed in Table 1. Median time to HF readmission was 83 days. Individuals who had an HF admission were older (75.7 vs 60.3 years, P < 0.05), more likely to have had a history of HF (52.0% vs 10.0%, P < 0.05), known coronary artery disease (28.5% vs 10.7%, P < 0.05), diabetes (43.4% vs 18.4%, P < 0.05), and hypertension (78.7% vs 38.0%, P < 0.05). Furthermore, they had poorer renal function (serum creatinine: 123.8 mmol/L vs 74.7 mmol/L, P < 0.05), higher inflammatory markers (C-reactive protein: 20.9 mg/L vs 13.9 mg/L, P < 0.05) as well as higher burden of comorbidities as indicated by the Charlson comorbidity score (3.7 vs 1.4, P < 0.05).Table 1Baseline Characteristics Stratified by Subsequent Heart Failure Readmission Within 12 MonthsCohortsP ValueAll (N = 14,131)No HF Readmission (n = 13,323)HF Readmission (n = 808)Demographics Age,61.1 (31.0)60.3 (31.0)75.7 (18.0)0.00 Female6,931 (49.0%)6,487 (48.7%)444 (55.0%)0.00 Rural2,148 (15.2%)2059 (15.5%)89 (11.0%)0.00Past medical history ACS9 (0.1%)8 (0.1%)<5 (<0.61%)0.41 AMI1,331 (9.4%)1,136 (8.5%)195 (24.1%)0.00 Angina1,363 (9.6%)1,184 (8.9%)179 (22.2%)0.00 Arrhythmia1926 (13.6%)1,583 (11.9%)343 (42.5%)0.00 CABG365 (2.6%)300 (2.3%)65 (8.0%)0.00 CAD1,655 (11.7%)1,425 (10.7%)230 (28.5%)0.00 COPD3,478 (24.6%)3,121 (23.4%)357 (44.2%)0.00 CVA1,028 (7.3%)898 (6.7%)130 (16.1%)0.00 Diabetes2,801 (19.8%)2,450 (18.4%)351 (43.4%)0.00 HF1749 (12.4%)1,329 (10.0%)420 (52.0%)0.00 HTN5,703 (40.4%)5,067 (38.0%)636 (78.7%)0.00 Dyslipidemia1,000 (7.1%)851 (6.4%)149 (18.4%)0.00 PCI917 (6.5%)806 (6.0%)111 (13.7%)0.00 CKD1,130 (8.0%)875 (6.6%)255 (31.6%)0.00 Smoking6,231 (44.1%)5,719 (42.9%)512 (63.4%)0.00 VT214 (1.5%)171 (1.3%)43 (5.3%)0.00 Charlson score1.5 (2.0)1.4 (2.0)3.7 (5.0)0.00Troponin T Number of measurements1.6 (1.0)1.5 (1.0)1.8 (1.0)0.00 Above the 99th percentile URL5,466 (38.7%)4,751 (35.7%)715 (88.5%)0.00 First30.1 (18.0)28.1 (15.0)62.1 (39.0)0.00 Max (ng/L)34.7 (18.0)32.3 (17.0)74.3 (44.0)0.00 Hours to max0.7 (0.0)0.6 (0.0)1.1 (2.0)0.00 Hours to first1.9 (1.0)1.8 (1.0)1.9 (2.0)0.26Biochemistry eGFR60.9 (51.0)61.8 (49.0)46.4 (47.0)0.00 Albumin29.1 (9.0)29.2 (10.0)27.9 (9.0)0.01 Creatinine77.5 (37.0)74.7 (37.0)123.8 (70.0)0.00 CRP14.3 (6.5)13.9 (6.0)20.9 (17.7)0.00 Hemoglobin111.2 (35.0)111.5 (34.0)105.4 (36.0)0.00 Platelets209.0 (122.0)209.5 (122.0)200.6 (121.5)0.03 PDW8.5 (1.6)8.4 (1.6)8.9 (1.6)0.00 Urate0.2 (0.4)0.2 (0.3)0.3 (0.3)0.00 Urea5.8 (3.8)5.6 (3.6)9.6 (7.4)0.00 WBC7.7 (4.7)7.7 (4.7)8.0 (4.9)0.05Angina at index presentation Nonspecific148 (1.0%)133 (1.0%)15 (1.9%)0.03 Other42 (0.3%)35 (0.3%)7 (0.9%)0.01 Spasm26 (0.2%)26 (0.2%)<5 (<0.6%)0.40 Unstable167 (1.2%)153 (1.1%)14 (1.7%)0.19Known myocardial infarction STEMI (anterior)64 (0.5%)57 (0.4%)7 (0.9%)0.10 STEMI (inferior)65 (0.5%)63 (0.5%)<5 (<0.6%)0.59 STEMI (other)19 (0.1%)18 (0.1%)<5 (<0.6%)1.00 NSTEMI326 (2.3%)297 (2.2%)29 (3.6%)0.02 MI (nonspecific)376 (2.7%)341 (2.6%)35 (4.3%)0.00ACS = acute coronary syndrome; AMI = acute myocardial infarction; CABG = coronary artery bypass grafting; CAD = coronary artery disease; CKD = chronic kidney disease; COPD = chronic obstructive pulmonary disease; CRP = C-reactive protein; CVA = cerebrovascular accident; eGFR = estimated glomerular filtration rate; HF = heart failure; HTN = hypertension; MI = myocardial infarction; NSTEMI = non–ST-segment elevation myocardial infarction; PCI = percutaneous coronary intervention; PDW = platelet distribution width; STEMI = ST-segment elevation myocardial infarction; URL = upper reference limit; VT = ventricular tachycardia; WBC = white blood cell. Table 1Baseline Characteristics Stratified by Subsequent Heart Failure Readmission Within 12 MonthsCohortsP ValueAll (N = 14,131)No HF Readmission (n = 13,323)HF Readmission (n = 808)Demographics Age,61.1 (31.0)60.3 (31.0)75.7 (18.0)0.00 Female6,931 (49.0%)6,487 (48.7%)444 (55.0%)0.00 Rural2,148 (15.2%)2059 (15.5%)89 (11.0%)0.00Past medical history ACS9 (0.1%)8 (0.1%)<5 (<0.61%)0.41 AMI1,331 (9.4%)1,136 (8.5%)195 (24.1%)0.00 Angina1,363 (9.6%)1,184 (8.9%)179 (22.2%)0.00 Arrhythmia1926 (13.6%)1,583 (11.9%)343 (42.5%)0.00 CABG365 (2.6%)300 (2.3%)65 (8.0%)0.00 CAD1,655 (11.7%)1,425 (10.7%)230 (28.5%)0.00 COPD3,478 (24.6%)3,121 (23.4%)357 (44.2%)0.00 CVA1,028 (7.3%)898 (6.7%)130 (16.1%)0.00 Diabetes2,801 (19.8%)2,450 (18.4%)351 (43.4%)0.00 HF1749 (12.4%)1,329 (10.0%)420 (52.0%)0.00 HTN5,703 (40.4%)5,067 (38.0%)636 (78.7%)0.00 Dyslipidemia1,000 (7.1%)851 (6.4%)149 (18.4%)0.00 PCI917 (6.5%)806 (6.0%)111 (13.7%)0.00 CKD1,130 (8.0%)875 (6.6%)255 (31.6%)0.00 Smoking6,231 (44.1%)5,719 (42.9%)512 (63.4%)0.00 VT214 (1.5%)171 (1.3%)43 (5.3%)0.00 Charlson score1.5 (2.0)1.4 (2.0)3.7 (5.0)0.00Troponin T Number of measurements1.6 (1.0)1.5 (1.0)1.8 (1.0)0.00 Above the 99th percentile URL5,466 (38.7%)4,751 (35.7%)715 (88.5%)0.00 First30.1 (18.0)28.1 (15.0)62.1 (39.0)0.00 Max (ng/L)34.7 (18.0)32.3 (17.0)74.3 (44.0)0.00 Hours to max0.7 (0.0)0.6 (0.0)1.1 (2.0)0.00 Hours to first1.9 (1.0)1.8 (1.0)1.9 (2.0)0.26Biochemistry eGFR60.9 (51.0)61.8 (49.0)46.4 (47.0)0.00 Albumin29.1 (9.0)29.2 (10.0)27.9 (9.0)0.01 Creatinine77.5 (37.0)74.7 (37.0)123.8 (70.0)0.00 CRP14.3 (6.5)13.9 (6.0)20.9 (17.7)0.00 Hemoglobin111.2 (35.0)111.5 (34.0)105.4 (36.0)0.00 Platelets209.0 (122.0)209.5 (122.0)200.6 (121.5)0.03 PDW8.5 (1.6)8.4 (1.6)8.9 (1.6)0.00 Urate0.2 (0.4)0.2 (0.3)0.3 (0.3)0.00 Urea5.8 (3.8)5.6 (3.6)9.6 (7.4)0.00 WBC7.7 (4.7)7.7 (4.7)8.0 (4.9)0.05Angina at index presentation Nonspecific148 (1.0%)133 (1.0%)15 (1.9%)0.03 Other42 (0.3%)35 (0.3%)7 (0.9%)0.01 Spasm26 (0.2%)26 (0.2%)<5 (<0.6%)0.40 Unstable167 (1.2%)153 (1.1%)14 (1.7%)0.19Known myocardial infarction STEMI (anterior)64 (0.5%)57 (0.4%)7 (0.9%)0.10 STEMI (inferior)65 (0.5%)63 (0.5%)<5 (<0.6%)0.59 STEMI (other)19 (0.1%)18 (0.1%)<5 (<0.6%)1.00 NSTEMI326 (2.3%)297 (2.2%)29 (3.6%)0.02 MI (nonspecific)376 (2.7%)341 (2.6%)35 (4.3%)0.00ACS = acute coronary syndrome; AMI = acute myocardial infarction; CABG = coronary artery bypass grafting; CAD = coronary artery disease; CKD = chronic kidney disease; COPD = chronic obstructive pulmonary disease; CRP = C-reactive protein; CVA = cerebrovascular accident; eGFR = estimated glomerular filtration rate; HF = heart failure; HTN = hypertension; MI = myocardial infarction; NSTEMI = non–ST-segment elevation myocardial infarction; PCI = percutaneous coronary intervention; PDW = platelet distribution width; STEMI = ST-segment elevation myocardial infarction; URL = upper reference limit; VT = ventricular tachycardia; WBC = white blood cell. Baseline Characteristics Stratified by Subsequent Heart Failure Readmission Within 12 Months ACS = acute coronary syndrome; AMI = acute myocardial infarction; CABG = coronary artery bypass grafting; CAD = coronary artery disease; CKD = chronic kidney disease; COPD = chronic obstructive pulmonary disease; CRP = C-reactive protein; CVA = cerebrovascular accident; eGFR = estimated glomerular filtration rate; HF = heart failure; HTN = hypertension; MI = myocardial infarction; NSTEMI = non–ST-segment elevation myocardial infarction; PCI = percutaneous coronary intervention; PDW = platelet distribution width; STEMI = ST-segment elevation myocardial infarction; URL = upper reference limit; VT = ventricular tachycardia; WBC = white blood cell. Overall model performance The performance of the various ML models is summarized in Table 2. For the prediction of HF readmission, the standard logistic regression yielded an AUC of 0.846 (95% CI: 0.828-0.861), with a sensitivity of 77.7% and specificity of 76%. The XGB model outperformed standard logistic regression and exhibited the highest ML AUC value of 0.861 (95% CI: 0.847-0.875), with a sensitivity of 82.2% and specificity of 73.8% (Figure 1). AUCs were 0.845 for RF, 0.851 for LASSO, and 0.842 for NN, respectively (Supplemental Figure 1). Based on the Youden's J statistic of 0.583 for the XGB model, which yielded an optimal prediction threshold of 0.364, Kaplan-Meier curves demonstrated a strong discriminatory capacity between high- vs low-risk groups (P < 0.001) (Figure 2). The XGB model was able to effectively discriminate HF readmission when the cohort was stratified into low-, medium-, and high-risk groups (P < 0.001) (Supplemental Figure 2).Table 2Performance Metrics of Machine Learning Models and Logistic Regression for Predicting Heart Failure Readmission Within 12 MonthsModelAUCSensSpecF1BrierPPVNPVXGB0.861 (0.847-0.875)0.822 (0.767-0.877)0.738 (0.725-0.751)0.267 (0.234-0.300)0.151 (0.145-0.157)0.160 (0.137-0.183)0.986 (0.981-0.991)Lasso0.851 (0.836-0.866)0.789 (0.738-0.840)0.738 (0.725-0.751)0.258 (0.227-0.289)0.160 (0.153-0.167)0.154 (0.133-0.175)0.983 (0.979-0.987)Logistic regression0.846 (0.828-0.861)0.777 (0.725-0.829)0.760 (0.747-0.773)0.270 (0.239-0.301)0.158 (0.151-0.165)0.164 (0.142-0.186)0.983 (0.978-0.988)Neural network0.842 (0.827-0.857)0.752 (0.700-0.804)0.772 (0.759-0.785)0.273 (0.242-0.304)0.145 (0.138-0.152)0.167 (0.145-0.189)0.981 (0.977-0.985)Random forest0.845 (0.830-0.860)0.512 (0.497-0.527)0.895 (0.894-0.896)0.316 (0.287-0.345)0.086 (0.081-0.091)0.229 (0.201-0.257)0.968 (0.961-0.975)NPV = negative predictive value; PPV = positive predictive value; XGB = eXtreme Gradient Boosting.Metrics include area under the receiver operating characteristic curve (AUC), sensitivity, specificity, F1-score, Brier score, positive predictive value (PPV), and negative predictive value (NPV).Figure 1Receiver-Operating Curves for the eXtreme Gradient Boosting and Logistic Regression Event Prediction ModelDelong's test was used to compare the AUC of the eXtreme Gradient Boosting model to the AUC of the logistic regression model. ROC = receiver operator characteristic.Figure 2Kaplan-Meier Curves for the eXtreme Gradient Boosting Model for the Prediction of Readmission With Heart FailureXGB Youden's J: 0.583, Optimal Threshold: 0.364 HF = heart failure. Table 2Performance Metrics of Machine Learning Models and Logistic Regression for Predicting Heart Failure Readmission Within 12 MonthsModelAUCSensSpecF1BrierPPVNPVXGB0.861 (0.847-0.875)0.822 (0.767-0.877)0.738 (0.725-0.751)0.267 (0.234-0.300)0.151 (0.145-0.157)0.160 (0.137-0.183)0.986 (0.981-0.991)Lasso0.851 (0.836-0.866)0.789 (0.738-0.840)0.738 (0.725-0.751)0.258 (0.227-0.289)0.160 (0.153-0.167)0.154 (0.133-0.175)0.983 (0.979-0.987)Logistic regression0.846 (0.828-0.861)0.777 (0.725-0.829)0.760 (0.747-0.773)0.270 (0.239-0.301)0.158 (0.151-0.165)0.164 (0.142-0.186)0.983 (0.978-0.988)Neural network0.842 (0.827-0.857)0.752 (0.700-0.804)0.772 (0.759-0.785)0.273 (0.242-0.304)0.145 (0.138-0.152)0.167 (0.145-0.189)0.981 (0.977-0.985)Random forest0.845 (0.830-0.860)0.512 (0.497-0.527)0.895 (0.894-0.896)0.316 (0.287-0.345)0.086 (0.081-0.091)0.229 (0.201-0.257)0.968 (0.961-0.975)NPV = negative predictive value; PPV = positive predictive value; XGB = eXtreme Gradient Boosting.Metrics include area under the receiver operating characteristic curve (AUC), sensitivity, specificity, F1-score, Brier score, positive predictive value (PPV), and negative predictive value (NPV). Performance Metrics of Machine Learning Models and Logistic Regression for Predicting Heart Failure Readmission Within 12 Months NPV = negative predictive value; PPV = positive predictive value; XGB = eXtreme Gradient Boosting. Metrics include area under the receiver operating characteristic curve (AUC), sensitivity, specificity, F1-score, Brier score, positive predictive value (PPV), and negative predictive value (NPV). Receiver-Operating Curves for the eXtreme Gradient Boosting and Logistic Regression Event Prediction Model Delong's test was used to compare the AUC of the eXtreme Gradient Boosting model to the AUC of the logistic regression model. ROC = receiver operator characteristic. Kaplan-Meier Curves for the eXtreme Gradient Boosting Model for the Prediction of Readmission With Heart Failure XGB Youden's J: 0.583, Optimal Threshold: 0.364 HF = heart failure. Feature importance Given its strongest predictive performance, this study applied SHAP values specifically for interpreting the XGB model. Figure 3 is the summary plot for the entire cohort showing the top 20 features for HF admission. Maximum troponin concentration, increasing age, history of HF, history of arrhythmias, and increasing Charlson Comorbidity Index contributed to an increasing risk of HF readmission. Conversely, increases in serum albumin, C-reactive protein, and hemoglobin appeared to reduce the risk of HF admission. Additionally, Figure 4 outlines waterfall plots, which visualize the SHAP values for a given patient, with features ranked from most to least important to predict an increased (Figure 4A) or decreased (Figure 4B) risk of HF readmission.Figure 3SHAP Summary Plot Demonstrating Ranking of Feature Importance Based on SHAP Values for the Machine Learning Model (eXtreme Gradient Boosting) to Predict Heart Failure Representation in the RAPIDx AI CohortFeatures are ranked in order of importance (from top to bottom) and are color coded by value (red indicating higher attribute values), with their horizontal location indicating their effect on the Shapley value (model output). CRP = C-reactive protein; COPD = chronic obstructive pulmonary disease; eGFR = estimated glomerular filtration rate.Figure 4Waterfall Plots for Individual Heart Failure Readmission Prediction(A and B) Beginning from the mean prediction at the bottom (Machine Learning score of 0.049), the waterfall plots display SHAP (SHapley Additive exPlanations) values in increasing order of magnitude, with red for increasing risk and blue for decreasing risk of heart failure representation. The positive or negative SHAP value of each feature is progressively added to reach the individual prediction. MDRD = modification of diet in renal disease; obbreviations as in Figures 2 and 3. SHAP Summary Plot Demonstrating Ranking of Feature Importance Based on SHAP Values for the Machine Learning Model (eXtreme Gradient Boosting) to Predict Heart Failure Representation in the RAPIDx AI Cohort Features are ranked in order of importance (from top to bottom) and are color coded by value (red indicating higher attribute values), with their horizontal location indicating their effect on the Shapley value (model output). CRP = C-reactive protein; COPD = chronic obstructive pulmonary disease; eGFR = estimated glomerular filtration rate. Waterfall Plots for Individual Heart Failure Readmission Prediction (A and B) Beginning from the mean prediction at the bottom (Machine Learning score of 0.049), the waterfall plots display SHAP (SHapley Additive exPlanations) values in increasing order of magnitude, with red for increasing risk and blue for decreasing risk of heart failure representation. The positive or negative SHAP value of each feature is progressively added to reach the individual prediction. MDRD = modification of diet in renal disease; obbreviations as in Figures 2 and 3. Event prediction The performance of the XGB event prediction model in predicting time-dependent probabilities of HF admission is summarized in Supplemental Figure 3. Following stratification of patients by risk at 3, 6, and 12 months postdischarge, the model demonstrated a progressive increase in predicted probabilities of HF admission among higher-risk individuals. Highest risk individuals had predicted probabilities of 21%, 30%, and 38% across 3, 6, and 12 months, respectively. The calibration model demonstrated low Brier scores (Supplemental Figure 4). Subgroup analysis In a subgroup where known HF was removed as a feature variable, the nested XGB model retained a strong predictive performance, albeit slightly reduced compared to the original XGB model (AUC: 0.851 vs 0.861, P < 0.01) (Supplemental Figure 5). This finding indicates that although the history of HF significantly contributes to the model’s accuracy, the XGB model remains effective even when this feature is excluded. Discussion In this study, we leveraged routinely collected EHR data captured in the process of clinical care from the RAPIDx AI trial in order to develop ML models for predicting subsequent HF admissions within 12 months among patients presenting to the ED with suspected cardiac symptoms warranting troponin testing. Our findings indicate that ML models demonstrated good discrimination for HF readmission, with the XGB model showing the strongest performance and outperforming traditional regression analysis. This model continued to perform well even when prior HF was removed as a feature. Importantly, although the primary endpoint was 12-month HF readmission, the model also demonstrated clear risk stratification at earlier time horizons (3 and 6 months), aligning with quality metrics focused on short-term HF readmissions. These findings support its potential role in early risk stratification, which may provide an opportunity for early intervention to optimize outcomes and reduce acute health system resource utilization. From a clinical perspective, this framework may enable identification of patients at higher risk of HF readmission at the point of ED presentation, supporting targeted follow-up and transitional care interventions. Consistent with prior studies, ML models provided modest improvements over logistic regression.15 In a systematic review of 122 studies, Bazoukis et al15 observed that ML models using continuous variables generally outperformed logistic regression.8 This advantage aligns with the expectation that ML models are not constrained by assumptions of linearity in predictor-outcome relationships, thus often achieving more accurate predictions with continuous variables.16 Our study integrated discrete EHR variables, encompassing a range of laboratory test results as continuous data, which likely contributed to the superior predictive capability demonstrated by ML models. Of note, our XGB model provided a very high degree of discrimination (AUC: 0.861), far superior to currently published risk models focused on HF hospitalization.17, 18, 19, 20, 21 In reviewing other studies that compare ML methods for predicting HF-related endpoints, we found several publications that support the ML models investigated in our manuscript.22 A recent analysis by König et al5 showed comparable predictive abilities between XGB and gradient boosting machine, while NN and RF models exhibited lower discriminatory power. In contrast, analysis data from the telemonitoring to improve heart failure outcomes (TELE-HF) trial23 patients propagated RF to be superior to other ML methods with predicting 30-day all-cause readmission for patients with HF.18 Hearn et al24 reported that NN models exceeded the performance of established risk prediction tools; however, they did not compare NN with other ML algorithms, which would be relevant, given that our findings showed slightly lower AUC values for NN compared to XGB and RF. The disparate success rates of these ML models underscore the absence of definitive evidence to endorse any specific ML algorithm as the optimal choice for predictive modeling.22 There have been suggestions in the literature about how to improve predictive range of risk strata and overall discrimination. Hu et al25 demonstrated that the use of time-based information can improve their predictive range and overall discrimination when predicting the risk of cardiogenic shock in cardiac intensive care patients. Thus, leveraging serially collected telemonitoring data in the ED may enhance both discrimination and predictive range in our ML models. Leveraging Shapley values for model interpretability, our analysis revealed that factors most strongly associated with HF readmissions aligned with findings from earlier studies.15,26 Despite the identification of critical predictive variables across more than 40 models, however, there remains limited evidence for the impact of integrating risk prediction models into clinical practice, nor is there any local or international guidance favoring one model over another.27 In their analysis, Rahimi et al28 found that while several models demonstrated robust validation and clinical relevance, significant differences persisted in statistical methods, sample size, population demographics, and parameter selection, precluding a clear recommendation for any single model. To advance clinical applicability, prospective trials are essential to validate and refine a predictive model that is both accurate and adaptable across diverse patient populations and health care settings. Early HF diagnosis remains pivotal for timely treatment initiation, reducing hospital admissions, and improving prognosis.15 Consequently, the need for an objective, noninvasive, and affordable tool for HF diagnosis and risk stratification is critical. Existing ML models, however, are primarily designed for populations with established HF, limiting their utility for broader, at-risk populations.29 Our study presents a novel ML technique with a broad inclusion criteria and strong discriminatory performance, identifying patients in EDs at risk for future HF admissions using routinely collected data that are electronically available. Furthermore, such capability serves to unlock opportunity to advance HF patient care by offering a mechanism to evaluate new therapies. AI-guided platform trials, which have been successfully implemented in cardiology, offer a transformative solution to the current protracted timelines required to conduct large-scale randomized evaluations.30 As such, this ML model could be integrated into health care systems to help identify patients most likely to attain benefit from specific interventions (eg, nursing home visits,31 rapid outpatient follow-up, pharmacological therapy beyond current HR guideline recommendations,32 or implantable cardioverter-defibrillator use26). By facilitating early and more precise patient identification and stratification, this approach not only accelerates the evaluation of novel interventions but also establishes the foundation for more efficient and targeted clinical trials in HF. Study Limitations Our study must be interpreted in the context of its potential limitations. First, data from a single geographic region in Australia may limit generalizability, underscoring the need for temporal and geographical validation across independent cohorts. Additionally, our models relied solely on structured predictor variables, potentially constraining predictive accuracy; future work should examine whether incorporating unstructured data, such as free-text clinical notes, improves HF-specific outcome prediction. Additional sensitivity analyses exploring alternative feature selection thresholds, imputation strategies, or modeling approaches were not performed and may further inform model stability. Our study did not evaluate variables including electrocardiographic signals, N-terminal pro-brain natriuretic peptide, hemodynamic parameters, and left ventricular ejection fraction, which could potentially enhance model predictive performance.6 Direct comparison of model-derived risk stratification with simple biomarker-based approaches (such as B-type natriuretic peptide or troponin categories) was not performed and represents an important area for future validation. Validation of our ML model in external and diverse populations is essential to confirm generalizability, given the regional and socioeconomic specificity of the South Australian cohort. Finally, although standardized treatment protocols in hospitals may affect care pathways and outcomes, our data set includes a range of hospital types, from regional to tertiary centers, which may help to mitigate this bias. In future work, we seek to externally validate our proposed ML model in large, diverse, geographically distinct cohorts. Conclusions This study demonstrates that ML models are capable of predicting HF readmission among at-risk cardiac patients presenting to the ED with high discriminatory capacity. An XGB model was the best performing and offered greater performance than that of standard methods. If externally validated, this model has the potential to provide robust and rapid risk stratification patients upon ED presentation and preselect high-risk individuals for further monitoring and implementation of preventive strategies to reduce the risk of HF readmissions, as well as for investigation of novel therapeutic strategies.PerspectivesCOMPETENCY IN MEDICAL KNOWLEDGE: The study highlights that ML models can predict 12-month HF readmission at the time of ED presentation, supporting clinicians in early risk stratification, targeted discharge planning, and personalized follow-up. This advances medical knowledge and systems-based practice by linking predictive analytics to real-world patient care.TRANSLATIONAL OUTLOOK: To achieve clinical translation, future work is required to prospectively validate predictive models in diverse ED populations, integrate them into EHRs for real-time decision support, and evaluate their impact on workflow efficiency, clinician adoption, and patient outcomes. COMPETENCY IN MEDICAL KNOWLEDGE: The study highlights that ML models can predict 12-month HF readmission at the time of ED presentation, supporting clinicians in early risk stratification, targeted discharge planning, and personalized follow-up. This advances medical knowledge and systems-based practice by linking predictive analytics to real-world patient care. TRANSLATIONAL OUTLOOK: To achieve clinical translation, future work is required to prospectively validate predictive models in diverse ED populations, integrate them into EHRs for real-time decision support, and evaluate their impact on workflow efficiency, clinician adoption, and patient outcomes. Funding support and author disclosures The original RAPIDx AI trial was funded by the 10.13039/501100000925NHMRC (GNT1191914); however, no funding was provided specifically for this subanalysis. Dr Chew has received personal fees from Abbott Vascular, CSL-Seqirus, and Novartis outside the submitted work. Dr Stub Volume 27, I personal fees from Proctor for Abbott Vascular, Edwards, and Medtronic outside the submitted work. All other authors have reported that they have no relationships relevant to the contents of this paper to disclose.