An ensemble machine learning model for predicting one-year mortality in elderly coronary heart disease patients with anemia

Objective This study was designed to develop and validate a robust predictive model for one-year mortality in elderly coronary heart disease (CHD) patients with anemia using machine learning methods. Methods Demographics, tests, comorbidities, and drugs were collected for a cohort of 974 elderly patients with CHD. A prospective analysis was performed to evaluate predictive performances of the developed models. External validation of models was performed in a series of 112 elderly CHD patients with anemia. Results The overall one-year mortality was 43.6%. Risk factors included heart rate, chronic heart failure, tachycardia and β receptor blockers. Protective factors included hemoglobin, albumin, high density lipoprotein cholesterol, estimated glomerular filtration rate (eGFR), left ventricular ejection fraction (LVEF), aspirin, clopidogrel, calcium channel blockers, angiotensin converting enzyme inhibitors (ACEIs)/ angiotensin receptor blockers (ARBs), and statins. Compared with other algorithms, an ensemble machine learning model performed the best with area under the curve (95% confidence interval) being 0.828 (0.805–0.870) and Brier score being 0.170. Calibration and density curves further confirmed favorable predicted probability and discriminative ability of an ensemble machine learning model. External validation of Ensemble Model also exhibited good performance with area under the curve (95% confidence interval) being 0.825 (0.734–0.916) and Brier score being 0.185. Patients in the high-risk group had more than six-fold probability of one-year mortality compared with those in the low-risk group ( P < 0.001). Shaley Additive exPlanation identified the top five risk factors that associated with one-year mortality were hemoglobin, albumin, eGFR, LVEF, and ACEIs/ARBs. Conclusions This model identifies key risk factors and protective factors, providing valuable insights for improving risk assessment, informing clinical decision-making and performing targeted interventions. It outperforms other algorithms with predictive performance and provides significant opportunities for personalized risk mitigation strategies, with clinical implications for improving patient care.


Introduction
Coronary heart disease (CHD) is a leading cause of mortality and disability in the elderly worldwide, posing a huge burden on the health and social care systems [1].It is estimated that about 11.39 million patients suffer from CHD in China, and mortality due to CHD was 121.59/100,000 among urban residents and 130.14/100,000 among rural residents in 2019 [2].Anemia is often found in patients with CHD and is a multifactorial problem in elderly patients [3,4].It was detected in approximately 10-20% of patients with CHD [3,5].Anemia would further worsen clinical outcome of CHD patients and was significantly associated with mortality in these patients [6].It is not only let patients and family physical and psychology agony, but also cause serious load on the society and economics.Accordingly, there is a strong interest among clinical physicians to assess CHD patients combined with anemia.Pathophysiologic mechanisms of anemia development in CHD patients include iron deficiency, blood loss, chronic inflammation, impaired renal function, and renin-angiotensin-aldosterone system inhibition [3,7,8].Emerging clinical researches indicated that anemia is a powerfully independent predictor of mortality in patients with CHD [9][10][11][12].The reasons for worse outcome of CHD patients with anemia are likely multifactorial.Anemia may decrease blood oxygen levels and worsen myocardial ischaemic injury in CHD.Systemic oxygen supply is maintained by inducing reactive tachycardia and increasing cardiac output in CHD patients with anemia [12,13].
Given deleterious effects of anemia on the patients with CHD and its intricate pathophysiologic process, it is imperative to swiftly identify effective strategies for the management of such patients.Survival prediction serves as a crucial benchmark for healthcare providers when performing risk evaluations for CHD patients with anemia.Previous studies have indicated that early and prompt identification of the high-risk patients is of great importance to reducing mortality risk in CHD patients [14].Nonetheless, there exists a dearth of research on the mortality risk within this specific demographic.Hence, it is necessary to develop robust predictive models to pinpoint CHD patients at high risk for premature mortality.Thus far, machine learning methods have been demonstrated to be a remarkably potent approach for developing predictive models in rendering accurate decisions across diverse clinical scenarios.Considering the ability to identify these individuals with more sensitivity and specificity than non-ensemble models, an ensemble machine learning model provided better performance and was increasingly employed across medical specialties [15].
Therefore, this study aimed at systematically and effectively investigating risk factors for survival outcome, and achieving model construction and validation to predict one-year mortality, among elderly CHD patients with anemia using machine learning methods.Performances of all models including Naïve Bayesian, XGBoosting Machine, Decision Tree, Ensemble Model, Support Vector Machine, and Logistic Regression were compared in this study in terms of area under the curve (AUC), Brier score, calibration curve, density curve, and discrimination slope.

Patients and study design
This study prospectively analyzed 974 elderly patients with CHD in the Department of Geriatric Cardiology, Chinese People's Liberation Army (PLA) General Hospital (Beijing, China).Patients were included if they (1) aged above 60 years, and (2) diagnosed with CHD.Patients were excluded if they had no anemia.Flow diagram of patient enrollment and study design is shown in the Fig. 1.A total of 397 elderly CHD patients with anemia were enrolled as the model derivation cohort, and these patients were randomly Fig. 1 Flow diagram of patient enrollment and study design divided into a training cohort (n = 269) and an internal validation cohort (n = 128) according to the ratio of 70:30 [16].The randomization of patients was achieved using our computer.Randomly splitting the data into the training and internal validation cohorts helps ensure that all models were trained and evaluated on a representative sample of the overall dataset.In addition, a series of 112 elderly CHD patients with anemia were involved in the external validation cohort from Hainan Hospital of Chinese PLA General Hospital (Sanya, China).Subgroup analysis was performed to compare basic characteristics between patients with and without one-year mortality, and the identified variables were included as input features to develop predictive models.The training cohort was used to train and optimize models using five machine learning models.Model validation was performed in the internal and external validation cohorts.The optimal model could be obtained by comparing predictive performances between five machine learning models.This study received the approval from Ethics Committee of Chinese PLA General Hospital, and was performed in accordance with tenets and provisions of Declaration of Helsinki, 1975.

Disease determination and outcome
CHD was diagnosed with clinical histories, angina symptoms, cardiac markers, and specific examinations including electrocardiogram (rest and exercise), echocardiography, radionuclide imaging, computed tomography, and coronary angiography on the basis of the American College of Cardiology/American Heart Association (ACC/ AHA)/European Society of Cardiology (ESC) guidelines [17,18].Anemia criteria was hemoglobin < 120 g/L in women and < 130 g/L in men according to the World Health Organization [11].Hypertension was considered to be present if systolic blood pressure ≥ 140mmHg, diastolic blood pressure ≥ 90mmHg, and/or undertaking anti-hypertensive treatment [19].An individual was considered to have diabetes if fasting plasma glucose was ≥ 7.0mmol/L, postprandial blood glucose (2-hour venous blood glucose) was ≥ 11.1mmol/L, and/or undertaking glucose-lowering treatment.Atrial fibrillation (AF) and chronic heart failure (CHF) were defined on the basis of the ACC/AHA/ESC guidelines for AF [20], and the ESC guidelines for CHF [21], respectively.Body mass index (BMI) was calculated as weight(kg)/height(m) 2 .Estimated glomerular filtration rate (eGFR) was calculated by a modified Modification of Diet in Renal Disease equation based on the data from Chinese patients [22]: 175 × serum creatinine (Scr, mg/dL) − 1.234 × age (year) − 0.179 (× 0.79 if female) Chronic kidney disease (CKD) was defined as eGFR < 60mL/minute/1.73m 2 on the basis of the Kidney Disease Outcomes Quality Initiative Working Group definition [23].Tachycardia was defined as resting heart rate (HR) of more than 100 beats per minute.Chinese PLA General Hospital was their designated hospital and had comprehensive medical treatment and final death records, which made it easier for us to track them for effective and accurate judgement of endpoint.The primary outcome of this study was one-year all-cause mortality, which was defined as patients died from any cause within one year after discharge.Mortality was determined by telephone interviews and medical records including legal documents of dead time, place and others.

Data collection and re-evaluation
The following variables were collected for this study: (1) demographics including age, gender, current smoker, BMI, HR, and left ventricular ejection fraction (LVEF); (2) tests including hemoglobin (g/L), albumin (g/dL), Scr (µmol/L), uric acid (µmol/L), high density lipoprotein cholesterol (HDL-C, mmol/L), and eGFR (mL/minute/1.73m 2 ); (3) comorbidities including hypertension, diabetes, AF, CHF, CKD, and tachycardia; and (4) drugs used including aspirin, clopidogrel, β receptor blockers, calcium channel blockers (CCBs), nitrates, angiotensin converting enzyme inhibitors (ACEIs)/angiotensin receptor blockers (ARBs), and statins.Tests were performed at admission in the Department of Biochemistry, Chinese PLA General Hospital.All information was obtained and preserved by trained researchers.To verify the accuracy of the results, other independent researchers performed logistical check and data re-evaluation.Missing values in the dataset were imputed with median.

Model construction and validation
Machine learning models including Naïve Bayesian, XGBoosting Machine, Decision Tree, Ensemble Model, Support Vector Machine, and Logistic Regression were introduced to train and optimize models in the training cohort.Ensemble Model was proposed to combine the results from Naïve Bayesian, XGBoosting Machine, Decision Tree, and Support Vector Machine.To streamline preprocessing steps, we used a Pipeline from scikit-learn, which allowed us to chain together multiple steps into a single object.This ensured that the same steps were applied consistently during training and validation of models.Grid and random hyper-parameter search were used to determine the optimal hyper-parameters, with AUC of receiver operating characteristics (ROC) as the optimization metric [24].Patients in the internal and external validation cohorts were used to assess the effectiveness of predictive models using AUC, Brier score, calibration curve, density curve, and discrimination slope.In addition, Shaley Additive exPlanation (SHAP) was performed to determine feature value.

Risk stratification system construction
Risk stratification was performed according to the ideal cut-off value determined by the average of the thresholds in the validation cohort [25,26].Patients who had predicted probability of one-year mortality that was less than the ideal cut-off value were categorized into the low-risk group, and those who had predicted probability of one-year mortality that was equal to or more than the ideal cut-off value were categorized into the high-risk group.

Statistical implementation and environment
Continuous variables that were not normally distributed were summarized as median with interquartile range [IQR], and categorical variables were presented as proportion.Comparison of continuous variables that were not normally distributed was performed using Wilcoxon rank test, while comparison of categorical variables was performed using Chi-square test or continuous adjusted Chi-square test.Kaplan-Meier analysis with log-rank test was used to compare survival outcome between the low-risk and high-risk groups.Traditional statistics were performed using R programming language (version 4.1, http://www.R-project.org).The whole code of this study was available at https://github.com/Starxueshu/codefor1ymortality.All statistical tests were two-tailed with P value of less than 0.05 indicating statistical importance.Machine learning modeling and interpretation were performed in an open-source web application of Jupyter Notebook in which authors are able to use Python language (version 3.9).

Model and external validation
Basic characteristics of all patients in the external validation cohort are shown in the Table 5. Ensemble Model also exhibited good performance with AUC (95% confidence interval) being 0.825 (0.734-0.916;Supplementary Fig. 1) and Brier score being 0.185 (Table 6).Ensemble Model had favorable separation in density curve (Supplementary Fig. 2).Ensemble Model had discrimination slope being 0.255 in violin plot (Supplementary Fig. 3).The above results indicated that Ensemble Model had favorable discrimination and calibration in the external validation cohort.

Risk stratification system development
A risk stratification system was developed, which successfully classified patients in the internal validation cohort into the low-risk and high-risk groups.Patients in the  high-risk group had more than six-fold probability of one-year mortality compared with those in the low-risk group (P < 0.001; Table 7).Kaplan-Meier analysis further confirmed these findings, showing that patients in the low-risk group had longer survival compared with those in the high-risk group (P < 0.001; Fig. 6).Hazard ratio was found to be 2.512 (95% confidential interval: 1.733-3.642),suggesting that patients in the high-risk group were 2.512 times more likely to experience one-year mortality compared with patients in the low-risk group (P < 0.001).Feature importance for clinical characteristics was further analyzed in the training cohort (Fig. 7A) and internal validation cohort (Fig. 7B).SHAP identified the top five risk factors that associated with one-year mortality were hemoglobin, albumin, LVEF, eGFR, and ACEIs/ARBs.To further elucidate clinical usefulness of the developed model, two patients were extracted from the external validation cohort, and their related clinical characteristics which were identified to be risk (red bar) and protective (blue bar) factors were included as input parameters to determine one-year mortality in the selected patients.The developed model predicted that one-year mortality was 84.40% for the true positive case (Fig. 8A) and 19.48% for the true negative case (Fig. 8B), respectively.

Discussion
Anemia and CHD are frequently encountered in elderly populations and are both related to adverse outcome.Nevertheless, because older patients were often excluded from the major clinical trials, rare studies have been performed to explore mortality risk in elderly CHD populations with anemia [27].There are many physiologic reasons related to anemia in the elderly including changed hormone levels, impaired inflammatory response, stem cell alteration, and reduced erythropoietin induction secondary to renal dysfunction [28].Meanwhile, anemia is intricately associated with a multitude of ailments, multiple models [29].At present, several studies have employed Ensemble Model among patients with cardiovascular diseases.For instance, Yang et al. [30].performed a study evaluating the potential of machine learning models including ElasticNet, Random Forest, XGBoost Machine, Deep Learning, Ensemble Model, Support Vector Machine, and Logistic Regression to predict cardiovascular risk in hypertensive population.Ensemble Model showed superior performance with AUC being 0.760 than Logistic Regression with AUC being 0.737 and other tested models.Chen et al. [31].developed Ensemble Model integrated by two machine learning methods (random down-sampling and random forest) to improve the accuracy of disease prediction and risk stratification in CHD patients.This model achieved good performance with AUC being 0.895 in random testing and 0.905 in sequential testing, respectively.
Our study developed an accurate model to predict one-year mortality among elderly CHD patients with anemia.Ensemble Model and other machine learning models were introduced for analysis in the study.Ensemble Model outperformed other models with AUC being 0.828 and Brier score being 0.170, indicating excellent predictive effectiveness.Subgroup analysis identified that clinical characteristics were significantly associated with one-year mortality with HR, CHF, tachycardia and β receptor blockers being risk factors and hemoglobin, albumin, HDL-C, eGFR, LVEF, aspirin, clopidogrel, CCBs, ACEIs/ARBs, and statins being protective factors.Most variables could be modulated through clinical interventions to enhance survival outcome and decrease mortality risk.All potential effects of confounding factors and more in-depth analysis of mentioned variables could indeed enhance the interpretation of elderly CHD patients with anemia.
Machine learning model's ability to manage complex interactions and confounding variables played a crucial role in deriving meaningful insights from the available data [32].The developed machine learning model in our study effectively discriminated between the low-risk and high-risk elderly CHD patients with anemia.This ability could potentially identify the high-risk patients and implement timely and effective interventions.Our risk stratification system clearly demonstrated that patients in the high-risk group had significantly higher one-year mortality compared with those in the low-risk group.This underscores immediate applicability of our model in predicting survival outcome of this specific population.
The developed model could help establish personalized therapeutic plans.For elderly CHD patients with anemia who were at high risk for one-year mortality, clinical interventions should be more comprehensive and intensive.Medication management is crucial including anti-platelets (aspirin and clopidogrel) to prevent blood clots, CCBs and ACEIs/ARBs to manage blood pressures, and statins to lower blood lipids.Comorbidities including CHF and tachycardia should be prevented and treated as a significant aspect of personalized therapeutic plans.Regular monitoring, treatment and follow-up are also essential involving frequent medical check-ups and home monitoring to track vital health metrics including hemoglobin, albumin, HDL-C, eGFR, and LVEF.Patient education and support through cardiac rehabilitation programs could play a role in managing clinical condition and improving life quality.Patients who were at low risk for one-year mortality require less intensive but still proactive management.Medication management includes standard cardiovascular drugs, potentially at low doses.Patient education, metric self-monitoring, routine monitoring (typically annual or bi-annual visits), and ongoing motivation and advice from support groups are also essential to maintaining their health.

Model clinical value analysis
Elevated HR is an important compensatory mechanism for maintaining oxygen delivery during anemia [33].John et al. [34].demonstrated that HR had an inverse linear relationship with hemoglobin with a mean increase of 3.9 beats per minute per gram of hemoglobin decrease.Nevertheless, numerous studies have indicated that elevated HR is an independent risk factor for cardiovascular diseases [35,36].Our study confirmed that tachycardia had deleterious effects on CHD patients with anemia, and patients with one-year mortality had higher HR than those surviving over one year.β receptor blockers are the main drugs for CHD, which could significantly reduce mortality risk in CHD patients [37][38][39].Cardioprotective effects of β receptor blockers in CHD are largely based on their HR-lowering role [40].However, John et al. [34,41].found that elevated HR in response to anemia could not be eliminated with β-adrenergic blockade.In clinical practice, clinicians need to distinguish between pathologic increase in HR and physiologic increase that is due to compensation for anemia to avoid excessive use of HR-lowering drugs.
Elderly patients frequently encounter challenges such as malnutrition, infection, renal dysfunction, and overloaded fluid, which result in hypoproteinemia and mortality.It have been proved that low albumin predicted poor outcome of CHD patients [42].A meta-analysis showed that low albumin was associated with an increased cardiovascular risk in healthy individuals [43].The reason for these findings may be that albumin plays protective roles through its anti-inflammatory, anti-oxidant, and anti-thrombotic effects, and it is affected by inflammation, infection, nutritional status, and fluid load [44].Thus, albumin could serve as a potential prognostic biomarker for cardiovascular diseases, helping discern disease progression promptly and accurately.
Compared with those surviving over one year, patients with one-year mortality had lower HDL-C and less statins.Consistent with our findings, previous studies have demonstrated that HDL-C is inversely associated clinical outcome of CHD patients [45,46].HDL-C could regulate atherosclerotic process and mediate cardioprotective effects like anti-inflammatory, anti-oxidant, and anti-thrombotic properties [47,48].Elevated HDL-C after treatment with stains could reduce cardiovascular diseases and consequent mortality [49].Therefore, clinicians should actively monitor and manage HDL-C at a reasonable level to enhance survival outcome of CHD patients with anemia.
Previous studies have demonstrated that ACEIs/ARBs are effective therapies in the reduction of hemoglobin in patients with polycythemia [50,51].The mechanism through which ACEIs/ARBs cause a decline in hemoglobin is that both ACEIs and ARBs could inhibit erythroid precursors by reducing erythropoietin induction [52,53].Although ACEIs/ARBs may theoretically aggravate hemoglobin reduction, our study suggested that ACEIs/ARBs could decrease mortality risk in elderly CHD patients with anemia.ACEIs/ARBs, when combined with other therapeutic drugs, may provide more beneficial effects in the treatment of elderly CHD populations with anemia.
In our study, patients with one-year mortality had elevated proportion of CHF, lower LVEF and eGFR, and less aspirin, clopidogrel, and CCBs.In clinical practice, patients with anemia are inadequately prescribed anti-platelet drugs presumably due to concern about bleeding [54].For instance, Nikolsky et al. [12].found that up to 18% of CHD patients with anemia were no longer receiving anti-platelet drugs in one-year followup.It is widely acknowledged that anti-platelet drugs could effectively achieve CHD prevention [55].Consequently, decreased anti-platelet drugs could also contribute to poor outcome of CHD patients with anemia.A meta-analysis performed by Sripal et al. [56].demonstrated that CCBs were associated with reduced cardiovascular risk in patients with CHD.In elderly CHD patients with anemia, our study found that CCBs were associated with lower mortality risk.Impaired renal function results in a decrease in absolute production of erythropoietin, which contributes to suppression of bone marrow and anemia in cardiovascular diseases [57,58].Impaired renal function could both lead to limited oxygen supply and increased cardiac workload [58].CHF is accountable for adverse outcome of CHD patients and is one of the primary causes of mortality.Our study showed that CHF was associated with increased mortality risk in elderly CHD patients with anemia.Therefore, effective prevention and management of CHF could reduce mortality risk in elderly CHD patients with anemia.

Limitation
Despite promising performance of our ensemble machine learning model in predicting one-year mortality in elderly CHD patients with anemia, several limitations must be acknowledged.Firstly, study population was derived from a cohort of 974 patients in a large tertiary hospital, with external validation performed on an additional 112 patients from another large tertiary hospital.While this study provided a solid foundation for initial validation, sample size and gender imbalance may limit the generalizability of the findings.This demographic reality should be factored in when evaluating model's relevance and generalizability to broader populations.Thus, larger multicenter studies are necessary to confirm the robustness of our model across diverse study populations and clinical scenarios.Secondly, our dataset, though comprehensive, is still constrained by the available variables.There may be other unmeasured or unknown factors affecting mortality risk that were not captured in our analysis, such as socioeconomic status, lifestyle factors, changed drugs or disease progression.More diverse datasets with a broader range of variables could potentially further enhance model's predictive ability, but this model would become complex and clinical practicality would be compromised.Thirdly, while machine learning models including Ensemble Model provide high accuracy and robustness, they often function as black boxes making it challenging to interpret underlying mechanisms driving the prediction.Although SHAP elucidates the importance of variables, a fully transparent model that clinicians could easily interpret is still needed to gain wider acceptance in clinical practice.Lastly, this study concentrated on the one-year mortality, excluding long-term mortality from its scope.Consequently, future research incorporating extended follow-up periods could provide valuable insights for predicting long-term mortality in those patients.

Conclusions
An ensemble machine learning model effectively predicts one-year mortality in elderly CHD patients with anemia.It outperforms other algorithms with superior ability in identifying these patients at high risk for one-year mortality.This model identifies key risk factors and protective factors, providing valuable insights for improving risk assessment, informing clinical decision-making and performing targeted interventions.Early intervention measures including preventing CHF and tachycardia, improving hemoglobin, albumin, HDL-C, eGFR, and LVEF, and using aspirin, clopidogrel, CCBs, ACEIs/ ARBs, and statins are recommended for elderly CHD patients with anemia.

Fig. 2
Fig. 2 Area under the curve (AUC) for machine learning models in the internal validation cohort.CI: confidence interval

Fig. 3
Fig. 3 Calibration curves for machine learning models in the internal validation cohort

Fig. 8
Fig. 8 Model explanation with a true positive case (A) and a true negative case (B) in the external validation cohort.ACEIs, angiotensin converting enzyme inhibitors; ARBs, angiotensin receptor blockers; LVEF, left ventricular ejection fraction; eGFR, estimated glomerular filtration rate; HDL-C, high density lipoprotein cholesterol; HR, heart rate

Table 2
Characteristic comparison among elderly coronary heart disease patients with anemia according to one-year mortalityCharacteristic comparison among patients in the training and internal validation cohorts is shown in the Table3.The above characteristics were included as input features to train and optimize models including HR, CHF, tachycardia, hemoglobin, albumin, HDL-C, eGFR, LVEF, aspirin, clopidogrel, β receptor blockers, CCBs, ACEIs/ARBs, and statins.Five machine learning models were used to train models for predicting oneyear mortality.The optimal hyper-parameters of these models are summarized in the Supplementary Table1.This study has also made all models available as a PKL file on the GitHub repository (https://github.com/Starxueshu/CHDmodel.git).As a result, Ensemble Model with the best AUC and Brier score was superior to other machine learning models in the internal validation cohort.Performances of each model are shown in the Table 4. Brier score was 0.174 for Naïve Bayesian, 0.193 for XGBoosting Machine, 0.223 for Decision Tree, 0.170 for Ensemble Model, 0.170 for Support Vector Machine, and 0.228 for Logistic Regression.Their corresponding AUC (95% IQR, interquartile range; BMI, body mass index; HR, heart rate; bpm, beat per minute; LVEF, left ventricular ejection fraction; Scr, serum creatinine; UA, uric acid; HDL-C, high density lipoprotein cholesterol; eGFR, estimated glomerular filtration rate; AF, atrial fibrillation; CHF, chronic heart failure; CKD, chronic kidney disease; CCBs, calcium channel blockers; ACEIs, angiotensin converting enzyme inhibitors; ARBs, angiotensin receptor blockersModel and internal validation

Table 3
Characteristic comparison among elderly coronary heart disease patients with anemia in the training and internal validation cohorts IQR, interquartile range; BMI, body mass index; HR, heart rate; bpm, beat per minute; LVEF, left ventricular ejection fraction; Scr, serum creatinine; UA, uric acid; HDL-C, high density lipoprotein cholesterol; eGFR, estimated glomerular filtration rate; AF, atrial fibrillation; CHF, chronic heart failure; CKD, chronic kidney disease; CCBs, calcium channel blockers; ACEIs, angiotensin converting enzyme inhibitors; ARBs, angiotensin receptor blockers

Table 4
Performances of machine learning models among elderly coronary heart disease patients with anemia for predicting one-year mortality in the internal validation cohort AUC, area under the curve; CI: confidence interval