Heart Disease Prediction Using a Comparison of Naïve Bayes and Random Forest Algorithms
DOI:
https://doi.org/10.59934/jaiea.v5i3.2413Keywords:
Heart Disease Prediction, Naïve Bayes, Random ForestAbstract
Heart disease is one of the leading causes of death worldwide, making early detection essential. This study compares the performance of the Naive Bayes and Random Forest algorithms in predicting heart disease using clinical data. The dataset includes attributes such as chest pain type (cp), maximum heart rate achieved (thalach), and slope of the ST segment (slope). The research process consists of data preprocessing, feature selection, model training, and evaluation using accuracy, precision, recall, and F1-score metrics. The results show that Random Forest outperformed Naive Bayes in heart disease prediction. Random Forest achieved an accuracy of 75%, precision of 69%, and recall of 86%, while Naive Bayes achieved an accuracy of 69%, precision of 66%, and recall of 72%. These findings indicate that Random Forest is more effective in handling the complexity of heart disease data and provides better predictive performance. This study demonstrates the potential of machine learning methods, particularly Random Forest, in supporting heart disease diagnosis and may serve as a reference for the development of medical decision support systems.
Downloads
References
H. M. Nawawi et al., “KOMPARASI ALGORITMA NEURAL NETWORK DAN NAÏVE BAYES,” vol. 15, no. 2, pp. 189–194, 2019, doi: 10.33480/pilarv15i2.669.
D. Derisma, “Perbandingan Kinerja Algoritma untuk Prediksi Penyakit Jantung dengan Teknik Data Mining,” J. Appl. Informatics Comput., vol. 4, no. 1, pp. 84–88, 2020, doi: 10.30871/jaicv4i1.2152.
D. H. Depari, Y. Widiastiwi, and M. M. Santoni, “Perbandingan Model Decision Tree, Naive Bayes dan Random Forest untuk Prediksi Klasifikasi Penyakit Jantung,” Inform. J. Ilmu Komput., vol. 18, no. 3, p. 239, 2022, doi: 10.52958/iftkv18i3.4694.
S. Sahar, “Analisis Perbandingan Metode K-Nearest Neighbor dan Naïve Bayes Clasiffier Pada Dataset Penyakit Jantung,” Indones. J. Data Sci., vol. 1, no. 3, pp. 79–86, 2020, doi: 10.33096/ijodasv1i3.20.
A. Riani, Y. Susianto, N. Rahman, and U. D. Ali, “Implementasi Data Mining Untuk Memprediksi Penyakit Jantung Mengunakan Metode Naive Bayes Data Mining Implementation to Predict Heart Disease using Naive Bayes Method,” vol. 1, no. 01, pp. 25–34, 2019, doi: 10.35970/jinitav1i01.64.
A. Riski, “Analisis Komparasi Algoritma Klasifikasi Data Mining Untuk Prediksi Penderita Penyakit Jantung,” J. Tek. Inform. Kaputama, vol. 3, no. 1, pp. 22–28, 2019, [Online]. Available: https://jurnal.kaputama.ac.id/index.php/JTIK/article/view/141/156.
M. R. S. Alfarizi, M. Z. Al-farish, M. Taufiqurrahman, G. Ardiansah, and M. Elgar, “Penggunaan Python Sebagai Bahasa Pemrograman untuk Machine Learning dan Deep Learning,” Karya Ilm. Mhs. Bertauhid (KARIMAH TAUHID), vol. 2, no. 1, pp. 1–6, 2023.
Rustam, Rustam, Sidik Rahmatullah, Supriyato Supriyato and Sri Wahyuni Sri Wahyuni. “PENERAPAN DATA MINING UNTUK PREDIKSI PENJUALAN PRODUK TRIPLEK PADA PT PUNCAK MENARA HIJAU MAS.” Jurnal Informasi dan Komputer (2020): n. pag.https://doi.org/10.35959/jik.v8i2.186?sid=semanticscholar.
Azhar, Yufis, Aidia Khoiriyah Firdausy, and Putri Juli Amelia. 2022. “Perbandingan Algoritma Klasifikasi Data Mining Untuk Prediksi Penyakit Stroke”. SINTECH (Science and Information Technology) Journal 5 (2):191-97. https://doi.org/10.31598/sintechjournal.v5i2.1222.
Cahyanti, F. L. D., Sarasati, F., Astuti, W., & Firasari, E. (2023). Klasifikasi Data Mining dengan Algoritma Machine Learning untuk Prediksi Penyakit Liver. Jurnal Ilmu dan Teknologi, 14(2), 134–139. https://ojs.uniska- bjm.ac.id/index.php/JIT
M. Romzi and B. Kurniawan, "Pembelajaran Pemrograman Python dengan Pendekatan Logika Algoritma," Jurnal Teknik Informatika Mahakarya (JTIM), vol. 3, no. 2, pp. 37–44, 2020.
A. Alhamad, A. I. S. Azis, B. Santoso, and S. Taliki, "Prediksi Penyakit Jantung Menggunakan Metode-Metode Machine Learning Berbasis Ensemble – Weighted Vote," Jurnal Edukasi dan Penelitian Informatika (JEPIN), vol. 5, no. 3, pp. 352–359, 2019
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.








