Predicting in-hospital mortality among patients admitted with a diagnosis of heart failure: a machine learning approach

ESC Heart Fail. 2024 Oct;11(5):2490-2498. doi: 10.1002/ehf2.14796. Epub 2024 Apr 18.

Abstract

Existing risk prediction models for hospitalized heart failure patients are limited. We identified patients hospitalized with a diagnosis of heart failure between 7 May 2013 and 26 April 2022 from a large academic, quaternary care medical centre (training cohort). Demographics, medical comorbidities, vitals, and labs were collected and were used to construct random forest machine learning models to predict in-hospital mortality. Models were compared with logistic regression, and to commonly used heart failure risk scores. The models were subsequently validated in patients hospitalized with a diagnosis of heart failure from a second academic, community medical centre (validation cohort). The entire cohort comprised 21 802 patients, of which 14 539 were in the training cohort and 7263 were in the validation cohort. The median age (25th-75th percentile) was 70 (58-82) for the entire cohort, 43.2% were female, and 6.7% experienced inpatient mortality. In the overall cohort, 7621 (35.0%) patients had heart failure with reduced ejection fraction (EF ≤ 40%), 1271 (5.8%) had heart failure with mildly reduced EF (EF 41-49%), and 12 910 (59.2%) had heart failure with preserved EF (EF ≥ 50%). Random forest models in the validation cohort demonstrated a c-statistic (95% confidence interval) of 0.96 (0.95-0.97), sensitivity (SN) of 87.3%, and specificity (SP) of 90.6% for the prediction of in-hospital mortality. Models for those with HFrEF demonstrated a c-statistic of 0.96 (0.94-0.98), SN 88.2%, and SP 91.0%, and those for patients with HFpEF showed a c-statistic of 0.95 (0.93-0.97), SN 87.4%, and SP 89.5% for predicting in-hospital mortality. The random forest model significantly outperformed logistic regression (c-statistic 0.87, SN 75.9%, and SP 86.9%), and current existing risk scores including the Acute Decompensated Heart Failure National Registry risk score (c-statistic of 0.70, SN 69%, and SP 62%), and the Get With the Guidelines-Heart Failure risk score (c-statistic 0.69, SN 67%, and SP 63%); P < 0.001 for comparison. Machine learning models built from commonly recorded patient information can accurately predict in-hospital mortality among patients hospitalized with a diagnosis of heart failure.

Keywords: Heart failure; Machine learning; Risk prediction.

Publication types

  • Review

MeSH terms

  • Aged
  • Aged, 80 and over
  • Female
  • Heart Failure* / diagnosis
  • Heart Failure* / mortality
  • Hospital Mortality* / trends
  • Hospitalization / statistics & numerical data
  • Humans
  • Machine Learning*
  • Male
  • Middle Aged
  • Prognosis
  • Retrospective Studies
  • Risk Assessment / methods
  • Risk Factors
  • Stroke Volume / physiology
  • Survival Rate / trends