Journal of Data Insights
Vol 4 No 1 (2026): Journal of Data Insights

Hyperparameter Optimization of Random Forest using Grey Wolf Optimization for Heart Disease Classification: Optimasi Hiperparameter Random Forest Menggunakan Grey Wolf Optimization untuk Klasifikasi Penyakit Jantung

Ratih Khotimahtus Sa'diyah (Universitas Muhammadiyah Semarang)
Muhammad Sam’an (Universitas Muhammadiyah Semarang)
Safuan (Universitas Muhammadiyah Semarang)
Mustafa Mat Deris (Universiti Muhammadiyah Malaysia)



Article Info

Publish Date
30 Jun 2026

Abstract

Cardiovascular disease remains one of the leading causes of death worldwide, making predictive models important to support early heart disease detection. Random Forest is widely used for heart disease classification, but its performance can be affected by hyperparameter selection. This study focuses on applying Grey Wolf Optimization (GWO) to selected Random Forest hyperparameters and evaluating the optimized model through a direct comparison with a baseline Random Forest model on the same testing dataset, supported by statistical verification. The dataset used is the Cleveland Heart Disease Dataset, consisting of 303 patient records, 13 predictor attributes, and one target attribute. The research stages include data preparation, preprocessing, stratified data splitting with an 80:20 ratio, hyperparameter optimization using GWO, and model evaluation. The GWO process uses the average F1-score from 5-fold cross-validation on the training set as the fitness value. Model performance is evaluated using accuracy, precision, recall, F1-score, AUC-ROC, confusion matrix analysis, and the exact McNemar test. The results show that the GWO-RF model obtains higher descriptive evaluation values than the baseline RF model, with accuracy increasing from 88.52% to 93.44%, precision from 81.82% to 90.00%, F1-score from 88.52% to 93.10%, and AUC-ROC from 95.13% to 96.86%, while recall remains at 96.43%. However, the exact McNemar test produces a p-value of 0.25, indicating that the difference is not statistically significant. Therefore, the improvement is interpreted as a descriptive performance gain rather than a statistically significant improvement.

Copyrights © 2026






Journal Info

Abbrev

jodi

Publisher

Subject

Computer Science & IT Mathematics

Description

The Journal of Data Insights is an open access publication for peer-reviewed scholarly journals. The Journal of Data Insights focuses on the processing, analysis and interpretation of data for data-driven decisions and solutions in industry, hospitals, government and universities. All articles ...