Jurnal: International Journal of Engineering and Computer Science Applications (IJECSA)
Vol. 5 No. 2 (2026): September 2026 (In Press)

A Comparison of Logistic Regression, Random Forest, and XGBoost Based on Feature Importance in Heart Failure Prediction

M. Thoriq Panca Mukti (Universitas Bumigora, Mataram, Indonesia)
Hairani Hairani (Universitas Bumigora, Mataram, Indonesia)
Djoko Rahardjo (Universitas Bumigora, Mataram, Indonesia)
M. Rizki (Universitas Bumigora, Mataram, Indonesia)



Article Info

Publish Date
15 Aug 2026

Abstract

Heart failure is a cardiovascular disease with a high mortality rate, requiring a prediction system capable of assisting in faster and more accurate early detection. This study aims to compare the performance of Logistic Regression, Random Forest, and XGBoost in predicting heart failure, with a focus on feature importance. The dataset is a public Kaggle dataset, consisting of 918 patient records with 11 features and 1 target attribute. The research stages include exploratory data analysis (EDA), data preprocessing, anomaly handling, label encoding, data standardization, model training, model evaluation, and feature importance analysis. Model evaluation was conducted using accuracy, precision, recall, and F1-score. The results indicate that Random Forest achieved the best performance, with an accuracy of 86.96%, a precision and recall of 88.24%, and an F1-score of 88.24%. Meanwhile, XGBoost achieved an accuracy of 85.87%, and Logistic Regression achieved 84.78%. The feature importance analysis revealed that the ST_Slope attribute was the most dominant feature across all three models in predicting heart failure. This study demonstrates that the Random Forest method provides superior classification performance compared to the other models, and feature importance analysis can aid in interpreting the clinical attributes that influence heart failure prediction.

Copyrights © 2026






Journal Info

Abbrev

IJECSA

Publisher

Subject

Computer Science & IT

Description

Description of Journal : The International Journal of Engineering and Computer Science Applications (IJECSA) is a scientific journal that was born as a forum to facilitate scientists, especially in the field of computer science, to publish their research papers. The 12th of the 12th month of 2021 is ...