Heart Failure Prediction Using Machine Learning: A Stacking Ensemble Approach
Abstract
Among non-communicable diseases, cardiac disorders account for the highest share of global deaths, claiming roughly 17.9 million lives annually. Identifying at-risk patients before clinical deterioration offers substantial therapeutic benefit, as prompt intervention materially changes prognosis. This study constructs a machine learning pipeline for binary classification of heart failure risk from structured patient data. Two architectures are developed and compared: an XGBoost classifier and a Stacking Ensemble that combines Random Forest and Gradient Boosting as base estimators, with Logistic Regression serving as the second-level meta-learner. Both models are trained and evaluated on the Heart Failure Prediction Dataset, an aggregated repository of 918 records characterised by 11 physiological attributes. The Stacking Ensemble attains approximately 90% classification accuracy, outperforming the standalone baseline. A Flask web interface exposes the trained model for real-time clinical scoring. The results underscore the value of ensemble strategies in building automated decision support tools for cardiac care.
References
D. Chicco and G. Jurman, "Machine learning can predict survival of patients with heart failure from serum creatinine and ejection fraction alone," BMC Medical Informatics and Decision Making, vol. 20, no. 1, 2020.
D. Shah, S. Patel, and S. K. Bharti, "Heart disease prediction using machine learning techniques," SN Computer Science, vol. 1, no. 6, 2020.
S. Mohan, C. Thirumalai, and G. Srivastava, "Effective heart disease prediction using hybrid machine learning techniques," IEEE Access, vol. 7, pp. 81542–81554, 2019.
C. B. R. Latha and S. C. Jeeva, "Improving the accuracy of prediction of heart disease risk based on ensemble classification techniques," Informatics in Medicine Unlocked, vol. 16, 2019.
V. Jindal, A. Gupta, and R. Bedi, "Heart disease prediction using XGBoost and feature selection," International Journal of Advanced Computer Science and Applications, vol. 12, no. 3, 2021.
T. Chen and C. Guestrin, "XGBoost: A scalable tree boosting system," in Proc. 22nd ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining, 2016, pp. 785–794.
L. Breiman, "Random forests," Machine Learning, vol. 45, no. 1, pp. 5–32, 2001.
Fedesoriano, "Heart Failure Prediction Dataset," Kaggle, 2021. [Online]. Available: https://www.kaggle.com/datasets/fedesoriano/heart-failure-prediction
A. Géron, Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd ed. O'Reilly Media, 2019.
World Health Organization, "Cardiovascular diseases (CVDs)," WHO Fact Sheet, 2021. [Online].
Available: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases
Refbacks
- There are currently no refbacks.