Reclassification of the unspecified heart failure data phenotype in electronic health records
C J Hayward, R Nadarajah, F Shuweihdi, Y Nakao, J Wu, C Gale
Key points
From the paper's conclusion- We trained machine learning algorithms to predict HFpEF or HFrEF using 20 variables including demographic factors, comorbidities and medicines, chosen using a supervised binary search of the predictor space [3].
Abstract
Background Heart failure (HF) is common and associated with morbidity and mortality. Treatment for HF with guideline-directed medicines improves prognosis and reduces the risk of HF hospitalisation [1]. Treatments for HF differ by ejection fraction phenotype. However, diagnostic codes in electronic health records (EHRs) infrequently reflect this, and individuals where HF is not coded as preserved (HFpEF) or reduced ejection fraction (HFrEF), herein referred to as ‘unspecified HF’, less frequently receive guideline-directed medicines and experience worse outcomes [2]. Objective To develop an algorithm in EHR data to reclassify individuals with ‘unspecified’ heart failure to HF with HFpEF or HFrEF. Methods We used primary care EHR data from individuals aged ≥40 years with a HF diagnostic code in the UK Clinical Practice Research Datalink-AURUM dataset between January 1998 and December 2021. We took the subpopulation with diagnostic codes consistent with HFpEF or HFrEF, divided into a training and testing dataset (80:20). We trained machine learning algorithms to predict HFpEF or HFrEF using 20 variables including demographic factors, comorbidities and medicines, chosen using a supervised binary search of the predictor space [3]. Prediction performance was evaluated with area under the receiver operating characteristic curve (AUROC). Prediction thresholds for HFpEF and HFrEF reclassification were selected using the likelihood ratio for a predefined probability of correct HF classification. Individuals with unspecified-HF were reclassified to either HFpEF or HFrEF using the best-performing model and derived thresholds. Results Of a cohort of 3,537,285 individuals, 28,832 (0.8%) were recorded as having HFpEF; 122,972 (3.5%) as HFrEF; and 580,793 (16.4%) as unspecified-HF (Table 1). Compared to the HFrEF cohort, the HFpEF cohort were older, more commonly women, and had a higher BMI. Among the trained models, XGBoost showed the best prediction performance (AUROC: XGBoost, 0.706 (95% CI 0.699-0.714); random forest, 0.702 (95% CI 0.695-0.709); logistic regression, 0.698 (95% CI 0.691-0.706)). Of the individuals diagnosed with unspecified-HF, XGBoost was able to reclassify 143,389 (24.7%) to HFpEF and 133,386 (23.0%) to HFrEF at a 75% probability of correct classification for both groups (Figure 1). Using stricter thresholds corresponding to a 90% probability of correct classification, 7,947 (1.4%) individuals with unspecified-HF were reclassified to HFpEF and 23,445 (4.0%) to HFrEF. Conclusion Supervised machine learning approaches in EHRs can be used to reclassify data phenotypes to more closely align with clinically actionable phenotypes. This model could be used at scale in UK primary care data to identify individuals with HF whose care can be improved through appropriate recognition of their HF phenotype.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Machine learning phenotyping of HefpEF :a systematic review and meta analysis of validation cohorts with external generalizability assessmentEuropean Heart Journal · 2026
- Characterizing the heterogeneity of heart failure with preserved ejection fraction: moving beyond subgroups and distinguishing disease from riskEuropean Journal of Heart Failure · 2026
- Machine learning-based identification of heart failure with reduced ejection fraction using routine laboratory indicators.Frontiers in cardiovascular medicine · 2026
- Advancing Heart Failure Classification Beyond Left Ventricular Ejection Fraction: Unsupervised Machine Learning Insights From the Japanese Nationwide Acute Decompensated Heart Failure Cohort: JROADHF.Journal of the American Heart Association · 2026
- Heart Failure Detection and Risk Stratification Using Machine Learning on Routinely Collected EMR VariablesAI · 2026
- CONFIDENT-HFpEF: a machine learning-based risk stratification for mortality and hospitalization using multimodal real-world dataESC Heart Failure · 2026