A Comparative Study for Time-to-Event Analysis and Survival Prediction for Heart Failure Condition using Machine Learning Techniques

Keywords: Machine Learning, Cardiovascular Disease, Survival Analysis, Heart Failure, Survival Classification, Cox PH Regression, Kaplan Meier Estimates


Heart Failure, an ailment in which the heart isn’t functioning as effectively as it should, causing in an insufficient cardiac output. The effectual functioning of the human body is dependent on how well the heart is able to pump oxygenated, and nutrient rich blood to the tissues and cells. Heart failure falls into the category of cardiovascular diseases - the disorders of the heart and blood vessels. One of the leading causes of global deaths resulting in an estimated 17.9 million deaths globally every year. The condition of heart failure results out of structural changes to the cardiac muscles majorly in the left ventricle. The weakened muscles cause the ventricle to lose its ability to contract completely. Since the left ventricle generates the required pressure for blood circulation, any kind of a failure condition results in the reduction of cardiac power output. This study aims to conduct a thorough survival analysis and survival prediction on the data of 299 patients classified into the class III/IV of heart failure and diagnosed with left ventricular systolic dysfunction. Survival analysis involves the study of the effect of a mediation assessed by measuring the number of subjects survived after that mediation over a period of time. The time starting from a distinct point to the occurrence of a certain event, for example death is known as survival time and the corresponding analysis is known as survival analysis. The analysis was performed using the methods of Kaplan-Meier (KM) estimates and Cox Potential Hazard regression. KM plots showed the survival estimates as a function of each clinical feature and how each feature at various levels affect survival over the period of time. Cox regression modelled the hazard of death event around the clinical features used for the study. As a result of the analysis, ejection fraction, serum creatinine, time and age were identified as highly significant and major risk factors in the advanced stages of heart failure. Age and rise in level of serum creatinine have a deleterious effect on the survival chances. Ejection Fraction has a beneficial effect on survival and with a unit increase in the in the EF level the probability of death event decreases by ~5.2%. Higher rate of mortality is observed during the initial days post diagnosis and the hazard gradually decreases if patients have lived for a certain number of days. Hypertension and anemic condition also seem to be high risk factors. Machine learning classification models for survival prediction were built using the most significant variables found from survival analysis. SVM, decision tree, random forest, XGBoost, and LightGBM algorithm were implemented, and all the models seem to perform well enough. However, the availability of more data will make the models more stable and robust. Smart solutions, like this can reduce the risk of heart failure condition by providing accurate prognosis, survival projections, and risk predictions. Technology and data can combine together to address any disparities in treatment, design better care plan, and improve patient health outcomes. Smart health AI solutions would enhance healthcare policies, enable physicians to look beyond the conventional practices, and increase the patient satisfaction levels not only in case of heart failure conditions but healthcare in general.


Download data is not yet available.


[1] N. D. WHO Team, “Cardiovascular diseases.” https://www.who.int/health-topics/cardiovascular-diseases#tab=tab_1 (accessed May 25, 2022).
[2] A. J. Coats, “The pathophysiology of chronic heart failure,” 2000.
[3] J. F. Nauta, X. Jin, Y. M. Hummel, and A. A. Voors, “Markers of left ventricular systolic dysfunction when left ventricular ejection fraction is normal,” Eur. J. Heart Fail., vol. 20, no. 12, pp. 1636–1638, Dec. 2018, doi: 10.1002/EJHF.1326.
[4] A. L. Bui, T. B. Horwich, and G. C. Fonarow, “Epidemiology and risk profile of heart failure,” Nat. Rev. Cardiol., vol. 8, no. 1, Jan. 2011, doi: 10.1038/NRCARDIO.2010.165.
[5] C. Bredy et al., “New York Heart Association (NYHA) classification in adults with congenital heart disease: relation to objective measures of exercise and outcome,” Eur. Hear. J. - Qual. Care Clin. Outcomes, vol. 4, no. 1, pp. 51–58, Jan. 2018, doi: 10.1093/EHJQCCO/QCX031.
[6] National Health Service, “Heart failure - NHS.” https://www.nhs.uk/conditions/heart-failure/ (accessed May 31, 2022).
[7] T. Ahmad, A. Munir, S. H. Bhatti, M. Aftab, and M. A. Raza, “Survival analysis of heart failure patients: A case study,” PLoS One, vol. 12, no. 7, p. e0181001, Jul. 2017, Accessed: Feb. 07, 2022. [Online]. Available: https://plos.figshare.com/articles/dataset/Survival_analysis_of_heart_failure_patients_A_case_study/5227684/1.
[8] T. Ashine, G. Muleta, and K. Tadesse, “Assessing survival time of heart failure patients: using Bayesian approach,” J. Big Data, vol. 8, no. 1, pp. 1–18, Dec. 2021, doi: 10.1186/S40537-021-00537-4/TABLES/5.
[9] C. Zheng et al., “Time-to-event prediction analysis of patients with chronic heart failure comorbid with atrial fibrillation: a LightGBM model,” BMC Cardiovasc. Disord., vol. 21, no. 1, pp. 1–12, Dec. 2021, doi: 10.1186/S12872-021-02188-Y/TABLES/5.
[10] D. Chicco and G. Jurman, “Machine learning can predict survival of patients with heart failure from serum creatinine and ejection fraction alone,” BMC Med. Inform. Decis. Mak., vol. 20, no. 1, pp. 1–16, Feb. 2020, doi: 10.1186/S12911-020-1023-5/TABLES/11.
[11] X. Jia, M. M. Baig, F. Mirza, and H. GholamHosseini, “A Cox-Based Risk Prediction Model for Early Detection of Cardiovascular Disease: Identification of Key Risk Factors for the Development of a 10-Year CVD Risk Prediction,” Adv. Prev. Med., vol. 2019, pp. 1–11, Apr. 2019, doi: 10.1155/2019/8392348.
[12] M. Cheraghi, M. Sadeghi, N. Sarrafzadegan, A. Pourmoghadas, and M. A. Ramezani, “Prognostic Factors for Survival at 6-Month Follow-up of Hospitalized Patients with Decompensated Congestive Heart Failure,” ARYA Atheroscler., vol. 6, no. 3, p. 112, 2010, Accessed: Jun. 09, 2022. [Online]. Available: /pmc/articles/PMC3347826/.
[13] S. E. Awan, M. Bennamoun, F. Sohel, F. M. Sanfilippo, and G. Dwivedi, “Machine learning-based prediction of heart failure readmission or death: implications of choosing the right model and the right metrics,” vol. 6, no. 2, pp. 428–435, Apr. 2019, Accessed: Jun. 08, 2022. [Online]. Available: https://onlinelibrary.wiley.com/doi/full/10.1002/ehf2.12419.
[14] R. J. Desai, S. V. Wang, M. Vaduganathan, T. Evers, and S. Schneeweiss, “Comparison of Machine Learning Methods With Traditional Models for Use of Administrative Claims With Electronic Medical Records to Predict Heart Failure Outcomes,” JAMA Netw. Open, vol. 3, no. 1, pp. e1918962–e1918962, Jan. 2020, doi: 10.1001/JAMANETWORKOPEN.2019.18962.
[15] B. Ambale-Venkatesh et al., “Cardiovascular Event Prediction by Machine Learning: The Multi-Ethnic Study of Atherosclerosis,” Circ. Res., vol. 121, no. 9, pp. 1092–1101, Oct. 2017, doi: 10.1161/CIRCRESAHA.117.311312.
[16] P. A. Moreno-Sanchez, “Improvement of a Prediction Model for Heart Failure Survival through Explainable Artificial Intelligence,” Aug. 2021, doi: 10.48550/arxiv.2108.10717.
[17] M. Tabassian et al., “Diagnosis of Heart Failure With Preserved Ejection Fraction: Machine Learning of Spatiotemporal Variations in Left Ventricular Deformation,” J. Am. Soc. Echocardiogr., vol. 31, no. 12, pp. 1272-1284.e9, Dec. 2018, doi: 10.1016/J.ECHO.2018.07.013.
[18] R. Najafi-Vosough, J. Faradmal, S. K. Hosseini, A. Moghimbeigi, and H. Mahjub, “Predicting Hospital Readmission in Heart Failure Patients in Iran: A Comparison of Various Machine Learning Methods,” Healthc. Inform. Res., vol. 27, no. 4, p. 307, Oct. 2021, doi: 10.4258/HIR.2021.27.4.307.
[19] B. J. Mortazavi et al., “Analysis of Machine Learning Techniques for Heart Failure Readmissions,” Circ. Cardiovasc. Qual. Outcomes, vol. 9, no. 6, pp. 629–640, Nov. 2016, doi: 10.1161/CIRCOUTCOMES.116.003039.
[20] S. B. Golas et al., “A machine learning model to predict the risk of 30-day readmissions in patients with heart failure: A retrospective analysis of electronic medical records data,” BMC Med. Inform. Decis. Mak., vol. 18, no. 1, Jun. 2018, doi: 10.1186/s12911-018-0620-z.
[21] J. M. Kwon et al., “Artificial intelligence algorithm for predicting mortality of patients with acute heart failure,” PLoS One, vol. 14, no. 7, p. e0219302, Jul. 2019, doi: 10.1371/JOURNAL.PONE.0219302.
[22] E. D. Adler et al., “Improving risk prediction in heart failure using machine learning,” Eur. J. Heart Fail., vol. 22, no. 1, pp. 139–147, Jan. 2020, doi: 10.1002/EJHF.1628.
[23] D. Kumar et al., “Cardiac Diagnostic Feature and Demographic Identification (CDF-DI): An IoT Enabled Healthcare Framework Using Machine Learning,” Sensors 2021, Vol. 21, Page 6584, vol. 21, no. 19, p. 6584, Oct. 2021, doi: 10.3390/S21196584.
[24] H. Li, M. H. Hastings, J. Rhee, L. E. Trager, J. D. Roh, and A. Rosenzweig, “Targeting Age-Related Pathways in Heart Failure,” Circ. Res., pp. 533–551, Feb. 2020, doi: 10.1161/CIRCRESAHA.119.315889.
[25] J. B. Strait and E. G. Lakatta, “Aging-associated cardiovascular changes and their relationship to heart failure,” Heart Fail. Clin., vol. 8, no. 1, p. 143, Jan. 2012, doi: 10.1016/J.HFC.2011.08.011.
[26] R. Shah and A. K. Agarwal, “Anemia associated with chronic heart failure: current concepts,” Clin. Interv. Aging, vol. 8, p. 111, Feb. 2013, doi: 10.2147/CIA.S27105.
[27] A. Taylor, “Anaemia.” https://www.who.int/health-topics/anaemia#tab=tab_1 (accessed Mar. 29, 2022).
[28] A. H. Association, “How High Blood Pressure Can Lead to Heart Failure | American Heart Association,” American Heart Association, 2016. https://www.heart.org/en/health-topics/high-blood-pressure/health-threats-from-high-blood-pressure/how-high-blood-pressure-can-lead-to-heart-failure (accessed Mar. 30, 2022).
[29] R. S. Aujla and R. Patel, “Creatine Phosphokinase,” StatPearls, Apr. 2022, Accessed: Apr. 02, 2022. [Online]. Available: https://www.ncbi.nlm.nih.gov/books/NBK546624/.
[30] “CPK Test - About, Normal Range, Preparation, Test Results & More.” https://www.portea.com/labs/diagnostic-tests/creatine-phosphokinase-cpk-ck-mb-bb-mm-test-83/ (accessed Apr. 02, 2022).
[31] H. C. Kenny and E. D. Abel, “Heart Failure in Type 2 Diabetes Mellitus,” Circ. Res., vol. 124, no. 1, pp. 121–141, Jan. 2019, doi: 10.1161/CIRCRESAHA.118.311371.
[32] G. M. Rosano, C. Vitale, and P. Seferovic, “Heart Failure in Patients with Diabetes Mellitus,” Card. Fail. Rev., vol. 3, no. 1, p. 52, 2017, doi: 10.15420/CFR.2016:20:2.
[33] S. Hajouli and D. Ludhwani, “Heart Failure And Ejection Fraction,” StatPearls, Aug. 2021, Accessed: Apr. 02, 2022. [Online]. Available: https://www.ncbi.nlm.nih.gov/books/NBK553115/.
[34] “Ejection Fraction Heart Failure Measurement | American Heart Association.” https://www.heart.org/en/health-topics/heart-failure/diagnosing-heart-failure/ejection-fraction-heart-failure-measurement (accessed Apr. 02, 2022).
[35] A. Strömberg and J. Mårtensson, “Gender differences in patients with heart failure,” Eur. J. Cardiovasc. Nurs., vol. 2, no. 1, pp. 7–18, Apr. 2003, doi: 10.1016/S1474-5151(03)00002-1.
[36] C. S. P. Lam et al., “Sex differences in heart failure,” Eur. Heart J., vol. 40, no. 47, pp. 3859-3868c, Dec. 2019, doi: 10.1093/EURHEARTJ/EHZ835.
[37] I. Chung and G. Y. H. Lip, “Platelets and heart failure,” Eur. Heart J., vol. 27, no. 22, pp. 2623–2631, Nov. 2006, doi: 10.1093/EURHEARTJ/EHL305.
[38] M. K. Mojadidi et al., “Thrombocytopaenia as a Prognostic Indicator in Heart Failure with Reduced Ejection Fraction,” Heart. Lung Circ., vol. 25, no. 6, pp. 568–575, Jun. 2016, doi: 10.1016/J.HLC.2015.11.010.
[39] M. G. Shlipak, G. C. Chertow, and B. M. Massie, “Beware the rising creatinine level,” J. Card. Fail., vol. 9, no. 1, pp. 26–28, Feb. 2003, doi: 10.1054/JCAF.2003.10.
[40] M. Metra, G. Cotter, M. Gheorghiade, L. Dei Cas, and A. A. Voors, “The role of the kidney in heart failure,” Eur. Heart J., vol. 33, no. 17, pp. 2135–2142, Sep. 2012, doi: 10.1093/EURHEARTJ/EHS205.
[41] T. B. Abebe et al., “The prognosis of heart failure patients: Does sodium level play a significant role?,” PLoS One, vol. 13, no. 11, Nov. 2018, doi: 10.1371/JOURNAL.PONE.0207242.
[42] H. J. Adrogué, “Hyponatremia in Heart Failure,” Methodist Debakey Cardiovasc. J., vol. 13, no. 1, p. 40, Jan. 2017, doi: 10.14797/MDCJ-13-1-40.
[43] NHLBI, “Smoking and Your Heart - How Smoking Affects the Heart and Blood Vessels | NHLBI, NIH,” National Heart, Lung, and Blood Institute, 2022. https://www.nhlbi.nih.gov/health/heart/smoking (accessed Apr. 01, 2022).
[44] NHLBI, “Smoking and Your Heart - Smoking Risks | NHLBI, NIH,” National Heart, Lung, and Blood Institute, 2022. https://www.nhlbi.nih.gov/health/heart/smoking/risks (accessed Apr. 01, 2022).
[45] D. Kamimura et al., “Cigarette smoking and incident heart failure: Insights from the jackson heart study,” Circulation, vol. 137, no. 24, pp. 2572–2582, Jun. 2018, doi: 10.1161/CIRCULATIONAHA.117.031912.
[46] A. A. Ahmed et al., “Risk of heart failure and death after prolonged smoking cessation: Role of amount and duration of prior smoking,” Circ. Hear. Fail., vol. 8, no. 4, pp. 694–701, May 2015, doi: 10.1161/CIRCHEARTFAILURE.114.001885.
[47] C. Mueller et al., “Roadmap for the treatment of heart failure patients after hospital discharge: an interdisciplinary consensus paper,” Swiss Med. Wkly. 2020 5, vol. 150, no. 5, p. w20159, Feb. 2020, doi: 10.4414/SMW.2020.20159.
[48] J. R. Agostinho et al., “Protocol-based follow-up program for heart failure patients: Impact on prognosis and quality of life,” Rev. Port. Cardiol., vol. 38, no. 11, pp. 755–764, Nov. 2019, doi: 10.1016/J.REPC.2019.03.006.
[49] F. A. Mcalister, E. Youngson, P. Kaul, and J. A. Ezekowitz, “Early follow-up after a heart failure exacerbation,” Circ. Hear. Fail., vol. 9, no. 9, Sep. 2016, doi: 10.1161/CIRCHEARTFAILURE.116.003194.
[50] E. L. Kaplan and P. Meier, “Nonparametric Estimation from Incomplete Observations,” J. Am. Stat. Assoc., vol. 53, no. 282, pp. 457–481, Jun. 1958, doi: 10.1080/01621459.1958.10501452.
[51] M. K. Goel, P. Khanna, and J. Kishore, “Understanding survival analysis: Kaplan-Meier estimate,” Int. J. Ayurveda Res., vol. 1, no. 4, p. 274, 2010, doi: 10.4103/0974-7788.76794.
[52] D. R. Cox, “Regression Models and Life-Tables,” J. R. Stat. Soc. Ser. B, vol. 34, no. 2, pp. 187–220, Apr. 1972, [Online]. Available: http://www.jstor.org/stable/2985181.
[53] C. Davidson-Pilon et al., “lifelines: survival analysis in Python,” J. Open Source Softw., vol. 4, no. 40, p. 1317, May 2019, doi: 10.5281/ZENODO.4816284.
How to Cite
S. Mishra, “A Comparative Study for Time-to-Event Analysis and Survival Prediction for Heart Failure Condition using Machine Learning Techniques”, j.electron.electromedical.eng.med.inform, vol. 4, no. 3, pp. 115-134, Jul. 2022.
Research Paper