Predictive Analysis Heart Disease Based on Machine Learning Using the Random Forest Algorithm

Authors

  • Anisa Handayani Universitas Muria Kudus
  • Syafira Salsabila
  • Auliya Firdausiyah
  • Arif Setiawan
  • Yutia Nia Nesicha

DOI:

https://doi.org/10.59934/jaiea.v4i3.1060

Keywords:

Classification, Heart Disease, Medical Dataset, Prediction, Random Forest

Abstract

Heart disease is one of the leading causes of death worldwide, requiring accurate and early detection systems. This study aims to build a predictive model for heart disease using the Random Forest algorithm based on patient medical records. The dataset used contains 1,190 patient records with 11 medical attributes. The data were preprocessed and divided into training and testing sets with an 80:20 ratio. The model was trained and evaluated using accuracy, confusion matrix, and classification report metrics. The results show that the model achieved 100% accuracy on the training data and 82.35% on the testing data. Important contributing features include max heart rate, chest pain type, old peak, and ST slope. In addition, predictions for individual patients were presented to improve interpretability. This approach demonstrates that machine learning, particularly Random Forest, can be a reliable method for early detection of heart disease and has potential for clinical decision support systems.

Downloads

Download data is not yet available.

References

A. M. A. Rahim, Inggrid Yanuar Risca Pratiwi, and Muhammad Ainul Fikri, “Klasifikasi Penyakit Jantung Menggunakan Metode Synthetic Minority Over-Sampling Technique Dan Random Forest Clasifier,” Indonesian Journal of Computer Science, vol. 12, no. 5, pp. 2995–3011, 2023, doi: 10.33022/ijcs.v12i5.3413.

D. H. Depari, Y. Widiastiwi, and M. M. Santoni, “Perbandingan Model Decision Tree, Naive Bayes dan Random Forest untuk Prediksi Klasifikasi Penyakit Jantung,” Informatik : Jurnal Ilmu Komputer, vol. 18, no. 3, p. 239, 2022, doi: 10.52958/iftk.v18i3.4694.

N. S. S. Silmi Ath Thahirah Al Azhima, D. Darmawan, N. Fahmi Arief Hakim, I. Kustiawan, M. Al Qibtiya, “Hybrid Machine Learning Model Untuk Memprediksi Penyakit,” Jurnal Teknologi Terpadu, vol. 8, no. 1, pp. 40–46, 2022.

A. S. Prabowo and F. I. Kurniadi, “Analisis Perbandingan Kinerja Algoritma Klasifikasi dalam Mendeteksi Penyakit Jantung,” Jurnal SISKOM-KB (Sistem Komputer dan Kecerdasan Buatan), vol. 7, no. 1, pp. 56–61, 2023, doi: 10.47970/siskom-kb.v7i1.468.

M. S. Ummah, BUKU SAKU FARMAKOTERAPI JANTUNG, vol. 11, no. 1. 2019. [Online]. Available: http://scioteca.caf.com/bitstream/handle/123456789/1091/RED2017-Eng-8ene.pdf?sequence=12&isAllowed=y%0Ahttp://dx.doi.org/10.1016/j.regsciurbeco.2008.06.005%0Ahttps://www.researchgate.net/publication/305320484_SISTEM_PEMBETUNGAN_TERPUSAT_STRATEGI_MELESTARI

H. Hidayat, A. Sunyoto, and H. Al Fatta, “Klasifikasi Penyakit Jantung Menggunakan Random Forest Clasifier,” Jurnal SISKOM-KB (Sistem Komputer dan Kecerdasan Buatan), vol. 7, no. 1, pp. 31–40, 2023, doi: 10.47970/siskom-kb.v7i1.464.

S. P. Tamba and E. -, “Prediksi Penyakit Gagal Jantung Dengan Menggunakan Random Forest,” Jurnal Sistem Informasi dan Ilmu Komputer Prima(JUSIKOM PRIMA), vol. 5, no. 2, pp. 176–181, 2022, doi: 10.34012/jurnalsisteminformasidanilmukomputer.v5i2.2445.

J. Elektronik et al., “Analisis Algoritma Random Forest Dalam Memprediksi Penyakit Jantung Koroner,” vol. 11, no. 4, pp. 2654–5101, 2023, [Online]. Available: https://www.kaggle.com/datasets/johnsmith88/heart-disease-dataset

N. H. Alfajr and S. Defiyanti, “METODE RANDOM FOREST DAN PENERAPAN PRINCIPAL COMPONENT ANALYSIS ( PCA ),” vol. 12, no. 3, 2024.

Downloads

Published

2025-06-15

How to Cite

Handayani, A., Salsabila, S., Firdausiyah, A., Setiawan, A., & Nia Nesicha, Y. (2025). Predictive Analysis Heart Disease Based on Machine Learning Using the Random Forest Algorithm. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 4(3), 1980–1986. https://doi.org/10.59934/jaiea.v4i3.1060

Issue

Section

Articles