Heart Failure Disease Classification Using Random Forest Algorithm with Grid Search Cross Validation Technique
Open Access
- 30 April 2025
- journal article
- Published by STMIK Indonesia Padang in The Indonesian Journal of Computer Science
- Vol. 14 (2)
Abstract
Heart failure is one of the leading causes of death worldwide and requires early detection to reduce the risk of serious complications. However, the imbalance in medical data poses a challenge in developing accurate prediction models. This study developed a heart failure classification model using the Random Forest algorithm, optimized with Grid Search Cross Validation to find the best combination of hyperparameters. The dataset consisted of 300 observations with 12 medical features and 1 target feature. Data preprocessing included outlier removal using the Interquartile Range (IQR) and Winsorize methods. The Synthetic Minority Oversampling Technique (SMOTE) was applied to address class imbalance, resulting in a more balanced training data distribution. The dataset was split into 80% training and 20% testing data using stratified sampling to maintain class proportions. The model was evaluated using accuracy, precision, recall, and F1-score metrics, with results showing 90% accuracy, 0.94 precision for class 0, 0.80 precision for class 1, 0.91 recall for class 0, and 0.86 recall for class 1. The model was implemented in a Streamlit-based application, allowing users to input health parameters and receive interactive predictions. This study demonstrates that optimizing the Random Forest algorithm with Grid Search Cross Validation can improve heart failure classification performance, providing a practical solution for supporting heart failure classification. Keywords: Heart Failure Classification, Random Forest, Hyperparameter Optimization, SMOTE, Model Evaluation.Keywords
This publication has 11 references indexed in Scilit:
- PEMANFAATAN MACHINE LEARNING DI BIDANG KESEHATANJATI (Jurnal Mahasiswa Teknik Informatika), 2024
- KARAKTERISTIK KEJADIAN MATI MENDADAK AKIBAT PENYAKIT KARDIOVASKULAR : LITERATURE REVIEWJurnal Kesehatan Tambusai, 2024
- Penerapan Machine Learning Algoritma Random Forest Untuk Prediksi Penyakit JantungPROSIDING SEMINAR NASIONAL SAINS DATA, 2024
- Perbandingan Algoritma Machine Learning dalam Analisis Penyebab Penyakit Gagal JantungJurnal Edukasi dan Penelitian Informatika (JEPIN), 2024
- PERBANDINGAN KINERJA ALGORITMA RANDOM FOREST CLASSIFIER DAN LIGHTGBM CLASSIFIER UNTUK PREDIKSI PENYAKIT JANTUNGData Sciences Indonesia (DSI), 2024
- Dukungan Keluarga Berhubungan dengan Kualitas Hidup Pasien Gagal JantungJurnal Penelitian Perawat Profesional, 2023
- Perbandingan Kinerja Algoritma Optimasi pada Metode Random Forest untuk Deteksi Kegagalan JantungJurnal Rekayasa Elektrika, 2022
- KOMPARASI METODE SUPPORT VECTOR MACHINE (SVM), K-NEAREST NEIGHBORS (KNN), DAN RANDOM FOREST (RF) UNTUK PREDIKSI PENYAKIT GAGAL JANTUNGMATHunesa: Jurnal Ilmiah Matematika, 2022
- Sistem Pakar Mendiagnosa Penyakit Gagal Jantung Pada Manusia Dengan Menggunakan Metode Certainty Factor Berbasis WebJurnal Ilmu Komputer dan Sistem Informasi (JIKOMSI), 2022
- Machine Learning Technology-Based Heart Disease Detection ModelsJournal of Healthcare Engineering, 2022