Improving Survival Prediction For Heart Failure Patients Using Random Forest And Grid Search CV

Authors

  • Sari Susanti Universitas Adhirajasa Reswara Sanjaya
  • Rui Septiansyah Putra Universitas Adhirajasa Reswara Sanjaya

DOI:

https://doi.org/10.58777/ise.v4i1.609

Keywords:

GridsearchCV;, Heart Failure, Hyperparameter Tuning, Machine Learning, Random Forest

Abstract

Heart failure remains a major cause of mortality worldwide, and predicting patient survival has become a key area where machine learning can support clinical decision-making. This study aims to improve the accuracy of survival prediction for heart failure patients by applying hyperparameter tuning to the Random Forest algorithm. Using a publicly available dataset from the UCI Machine Learning Repository, a structured machine learning pipeline was developed. This includes data preprocessing, outlier treatment using the capping method, stratified data splitting, and model training. The Random Forest model was first trained using default parameters to establish a baseline, and then optimized using Grid Search Cross Validation to identify the best hyperparameter configuration. Results show that the optimized model achieved improved accuracy (80.83%), recall (66.00%), and F1-score (0.7416) compared to the baseline. These improvements demonstrate that systematic tuning of machine learning models can significantly enhance their predictive capability in clinical settings. The model showed greater sensitivity in identifying high-risk patients, which is essential for early intervention strategies. Although limited by the dataset size, this study offers a replicable framework for predictive modeling in healthcare and underscores the potential of machine learning as a tool for mortality risk stratification.

References

Abubakar, M. A., Muliadi, M., Farmadi, A., Herteno, R., & Ramadhani, R. (2023). Random Forest Dengan Random Search Terhadap Ketidakseimbangan Kelas Pada Prediksi Gagal Jantung. Jurnal Informatika, 10(1), 13–18. https://doi.org/10.31294/inf.v10i1.14531

Adisasmito, W., Amir, V., Atin, A., Megraini, A., & Kusuma, D. (2020). Geographic and socioeconomic disparity in cardiovascular risk factors in Indonesia: Analysis of the basic health research 2018. BMC Public Health, 20. https://doi.org/10.1186/s12889-020-09099-1

Al’Aref, S. J., Anchouche, K., Singh, G., Slomka, P. J., Kolli, K. K., Kumar, A., Pandey, M., Maliakal, G., Van Rosendael, A. R., Beecy, A. N., Berman, D. S., Leipsic, J., Nieman, K., Andreini, D., Pontone, G., Schoepf, U. J., Shaw, L. J., Chang, H. J., Narula, J., … Min, J. K. (2019). Clinical applications of machine learning in cardiovascular disease and its relevance to cardiac imaging. In European Heart Journal (Vol. 40, Number 24, pp. 1975–1986). Oxford University Press. https://doi.org/10.1093/eurheartj/ehy404

Alfajr, N. H., & Defiyanti, S. (2024). Prediksi Penyakit Jantung Menggunakan Metode Random Forest Dan Penerapan Principal Component Analysis (PCA). Jurnal Informatika Dan Teknik Elektro Terapan, 12(3S1). https://doi.org/10.23960/jitet.v12i3S1.5055

Bozkurt, B., Coats, A. J., Tsutsui, H., Abdelhamid, M., Adamopoulos, S., Albert, N., Anker, S. D., Atherton, J., Böhm, M., Butler, J., Drazner, M. H., Felker, G. M., Filippatos, G., Fonarow, G. C., Fiuzat, M., Gomez-Mesa, J. E., Heidenreich, P.,

Imamura, T., Januzzi, J., … Zieroth, S. (2021). Universal Definition and Classification of Heart Failure: A Report of the Heart Failure Society of America, Heart Failure Association of the European Society of Cardiology, Japanese Heart Failure Society and Writing Committee of the Universal Definition of Heart Failure. Journal of Cardiac Failure, 27(4), 387–413. https://doi.org/10.1016/j.cardfail.2021.01.022

Chicco, D., & Jurman, G. (2020). Machine learning can predict survival of patients with heart failure from serum creatinine and ejection fraction alone. BMC Medical Informatics and Decision Making, 20(1). https://doi.org/10.1186/s12911-020-1023-5

Cleland, J. G. F. (2021). The struggle towards a Universal Definition of Heart Failure—how to proceed? European Heart Journal, 42(24), 2331–2332. https://doi.org/10.1093/eurheartj/ehab082

Garg, A., & Mago, V. (2021). Role of machine learning in medical research: A survey. In Computer Science Review (Vol. 40). Elsevier Ireland Ltd. https://doi.org/10.1016/j.cosrev.2021.100370

Jalal, N., Mehmood, A., Choi, G. S., & Ashraf, I. (2022). A novel improved random forest for text classification using feature ranking and optimal number of trees. Journal of King Saud University - Computer and Information Sciences, 34(6), 2733–2742. https://doi.org/10.1016/j.jksuci.2022.03.012

Janiesch, C., Zschech, P., & Heinrich, K. (2021). Machine learning and deep learning. https://doi.org/10.1007/s12525-021-00475-2/Published

Pratiwi, N. K. C., Ibrahim, N., & Saidah, S. (2024). Prediksi Kanker Paru menggunakan Grid search untuk Optimasi Hyperparameter pada Algoritma MLP dan Logistic Regression. ELKOMIKA: Jurnal Teknik Energi Elektrik, Teknik Telekomunikasi, & Teknik Elektronika, 12(3), 556. https://doi.org/10.26760/elkomika.v12i3.556

Reig, B., Heacock, L., Geras, K. J., & Moy, L. (2020). Machine learning in breast MRI. In Journal of Magnetic Resonance Imaging (Vol. 52, Number 4, pp. 998–1018). John Wiley and Sons Inc. https://doi.org/10.1002/jmri.26852

Shah, D., Patel, S., & Bharti, S. K. (2020). Heart Disease Prediction using Machine Learning Techniques. SN Computer Science, 1(6). https://doi.org/10.1007/s42979-020-00365-y

Shahim, B., Kapelios, C. J., Savarese, G., & Lund, L. H. (2023). Global Public Health Burden of Heart Failure: An Updated Review. Cardiac Failure Review, 9. https://doi.org/10.15420/cfr.2023.05

Sitanggang, B. F., & Sitompul, P. (2024). Deteksi Awal Kelangsungan Hidup Pasien Gagal Jantung Menggunakan Machine Learning Metode Random Forest. INNOVATIVE: Journal Of Social Science Research, 4, 3347–3357.

Downloads

Published

2026-06-28

How to Cite

Susanti, S., & Putra, R. S. (2026). Improving Survival Prediction For Heart Failure Patients Using Random Forest And Grid Search CV . Informatics and Software Engineering, 4(1), 1–7. https://doi.org/10.58777/ise.v4i1.609

Issue

Section

Articles