DOI: 10.1177/20552076261499433 ISSN: 2055-2076

Development and validation of a machine learning model for heart failure in older patients with atrial fibrillation

Wenhua Chen, Yanjiao Wu, Zhisheng Yao, Jiani Wu, Hua Gao

Objective

This study aimed to develop and internally evaluate a machine learning (ML) model based on real-world data for identifying clinically adjudicated heart failure (HF) during hospitalisation in older patients with atrial fibrillation (AF) and to compare various models for such an assessment approach.

Methods

Older patients with AF who were admitted to the General Hospital of Ningxia Medical University between 2023 and 2024 were included. Demographic characteristics, vital signs, comorbidities, medication use, and routine laboratory measurements were extracted from electronic medical records. Least absolute shrinkage and selection operator (LASSO) regression was used to select candidate predictors, after which five ML models were developed and compared. Separate, non-overlapping training and test sets were used for model development and evaluation. Model performance was assessed in terms of discrimination, calibration, potential clinical net benefit, and interpretability.

Results

This study included 1,989 patients, 11% of whom experienced HF during hospitalisation. Through LASSO regression, 16 key variables were identified, including age, vital signs, comorbidities, and multiple hematologic indicators. Among the five models, XGBoost performed the best on the test set (AUROC 0.737), exhibiting balanced accuracy, sensitivity, and specificity without marked overfitting. The calibration curve demonstrated strong concordance between model predictions and actual risks. The decision curve analysis (DCA) demonstrated high net benefit within the 5%–40% threshold range. SHAP analysis identified age, RDW series indicators, anemia indicators, and infection-related variables as the most significant features, aligning with the pathophysiology of HF.

Conclusion

The XGBoost model for identifying clinically adjudicated HF among hospitalised older patients with AF showed moderate discriminatory ability, calibration, and exploratory findings from decision curve analysis, as well as high interpretability. This model may serve as an exploratory admission-based assessment approach for identifying patients who meet the prespecified criteria for HF during hospitalisation. Prospective external validation is required before its potential clinical application can be determined.

More from our Archive