Analisis Perbandingan Algoritma Decision Tree, Random Forest, KNN, dan SVM Dalam Prediksi Penyakit Jantung

Authors

  • Muhammad Muttakin Universitas Riau Author
  • Najwa Rokhan Rusmana Universitas Riau Author
  • dian ramadhani Universitas Riau Author

Keywords:

Algoritma Klasifikasi, Jantung, Prediksi, Risiko, SVM

Abstract

Heart disease is a serious global health problem, causing 9.4 million deaths each year and is expected to increase to 23.3 million by 2030. The lack of early detection and unhealthy lifestyles are major factors contributing to the rise in cases, especially in developing countries. This study aims to develop an accurate and efficient heart disease risk prediction system as support for early diagnosis. The methods used involve four classification algorithms: Decision Tree, Random Forest, K-Nearest Neighbors (KNN), and Support Vector Machine (SVM), which are evaluated based on accuracy, precision, and F1-score as well as cross-validation. Previous research has shown that KNN is effective in classifying medical data and can detect accurately. In this study, the evaluation results show that Decision Tree and Random Forest have the best accuracy, reaching 99%. Meanwhile, KNN and SVM have accuracies of 84% and 88%. Therefore, the selection of the model must consider the balance between accuracy and generalization ability. It is recommended to use larger and more diverse datasets to improve the reliability of the model in real-world applications, so that early detection systems can help reduce mortality rates due to heart disease.

Downloads

Download data is not yet available.

References

[1] B. Provinsi, S. Barat, N. Adhyka, E. Trio Effandilus, and A. Y. Putri, “Faktor Risiko Kejadian Penyakit Jantung Koroner di Poliklinik RSUD Solok Selatan Tahun 2022,” Jurnal Pembangunan Nagari, vol. 8, no. 1, 2023, doi: 10.30559/jpn.v%vi%i.392.

[2] E. M. Marwali, Y. Purnama, P. S. Roebiono, K. : Eva, M. Marwali, and T. Pustaka, “Modalitas Deteksi Dini Penyakit Jantung Bawaan di Pelayanan Kesehatan Primer,” 2021. doi: https://doi.org/10.47830/jinma-vol.71.2-2021-241.

[3] Y. Amelia, “PERBANDINGAN METODE MACHINE LEARNING UNTUK MENDETEKSI PENYAKIT JANTUNG,” 2023. doi: https://doi.org/10.36080/idealis.v6i2.3043.

[4] A. B. Wibisono and A. Fahrurozi, “PERBANDINGAN ALGORITMA KLASIFIKASI DALAM PENGKLASIFIKASIAN DATA PENYAKIT JANTUNG KORONER,” Jurnal Ilmiah Teknologi dan Rekayasa, vol. 24, no. 3, pp. 161–170, 2019, doi: http://dx.doi.org/10.35760/tr.2019.v24i3.2393.

[5] M. F. Costantino, F. Cortese, G. D’Addeo, A. Nicoletti, S. Mancino, and L. Stolfi, “Diagnostic modalities for ischemic heart disease: evaluating the role of stress echocardiography, cardiac CT, and myocardial perfusion scintigraphy in guiding coronary angiography,” Exploration of Cardiology, Jan. 2025, doi: 10.37349/ec.2025.101243.

[6] T. K. Ningsih and H. Zakaria, “Implementasi Algoritma K-Nearest Neighbor Pada Sistem Deteksi Penyakit Jantung (Studi Kasus : Klinik Makmur Jaya),” 2023. Accessed: May 26, 2025. [Online]. Available: https://journal.mediapublikasi.id/index.php/logic/article/view/2448

[7] P. Peace, “Data Preprocessing for AI Models.” [Online]. Available: https://www.researchgate.net/publication/385707249

[8] H. Priatmojo, F. Saputra, M. H. Prasetiyo, D. Puspitasari, and D. Nurlaela, “Perbandingan Klasifikasi Tingkat Penjualan Buah di Supermarket dengan Pendekatan Algoritma Decision Tree, Naive Bayes dan K-Nearest Neighbor,” Jurnal INSAN (Journal of Information Systems Management Innovation, vol. 3, no. 1, 2023, doi: https://doi.org/10.31294/jinsan.v3i1.2097.

[9] P. Rim and E. Liu, “Optimizing the C4.5 Decision Tree Algorithm using MSD-Splitting,” 2020. [Online]. Available: www.ijacsa.thesai.org

[10] C. N. Syahputri and M. S. Hasibuan, “Optimasi Klasifikasi Decision Tree Dengan Teknik Pruning Untuk Mengurangi Overfitting,” JSiI (Jurnal Sistem Informasi), vol. 11, no. 2, pp. 87–96, Sep. 2024, doi: 10.30656/jsii.v11i2.9161.

[11] A. Putra Argadianata, D. Abdul Fatah, H. Sukri, J. Raya Telang, K. Kamal, and J. Timur, “KLASIFIKASI KUALITAS BUAH APEL MENGGUNAKAN METODE RANDOM FOREST,” 2025. doi: https://doi.org/10.36040/jati.v9i2.12854.

[12] M. A. Hassan, H. Salem, N. Bailek, and O. Kisi, “Random Forest Ensemble-Based Predictions of On-Road Vehicular Emissions and Fuel Consumption in Developing Urban Areas,” Sustainability (Switzerland) , vol. 15, no. 2, Jan. 2023, doi: 10.3390/su15021503.

[13] M. Haddouchi and A. Berrado, “A survey and taxonomy of methods interpreting random forest models Conflict of Interest,” 2024. doi: http://dx.doi.org/10.48550/arXiv.2407.12759.

[14] A. Yogianto, A. Homaidi, and Z. Fatah, “Implementasi Metode K-Nearest Neighbors (KNN) untuk Klasifikasi Penyakit Jantung,” G-Tech: Jurnal Teknologi Terapan, vol. 8, no. 3, pp. 1720–1728, Jul. 2024, Accessed: May 26, 2025. [Online]. Available: https://www.researchgate.net/publication/382022689_Implementasi_Metode_K-Nearest_Neighbors_KNN_untuk_Klasifikasi_Penyakit_Jantung/fulltext/66882787f3b61c4e2cb2f356/Implementasi-Metode-K-Nearest-Neighbors-KNN-untuk-Klasifikasi-Penyakit-Jantung.pdf

[15] M. H. Setiono, “Komparasi Algoritma Decision Tree, Random Forest, SVM DAN K-NN Dalam Klasifikasi Kepuasan Penumpang Maskapai Penerbangan,” INTI Nusa Mandiri, vol. 17, no. 1, pp. 32–39, Oct. 2022, doi: 10.33480/inti.v17i1.3420.

[16] A. A. Amer, S. D. Ravana, and R. A. A. Habeeb, “Effective k-nearest neighbor models for data classification enhancement,” J Big Data, vol. 12, no. 1, Dec. 2025, doi: 10.1186/s40537-025-01137-2.

[17] Asri Mulyani, Sarah Khoerunisa, and Dede Kurniadi, “Perbandingan Kinerja Algoritma KNN dan SVM Menggunakan SMOTE untuk Klasifikasi Penyakit Diabetes,” Jurnal Nasional Teknik Elektro dan Teknologi Informasi, vol. 14, no. 1, pp. 25–34, Feb. 2025, Accessed: May 26, 2025. [Online]. Available: https://jurnal.ugm.ac.id/v3/JNTETI/article/view/15198

[18] Z. Jun, “The Development and Application of Support Vector Machine,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Jan. 2021. doi: 10.1088/1742-6596/1748/5/052006.

[19] S. Adaramaja, S. Aliyu, and F. B. Abdullahi, “Hyper-parameter tuning for support vector machine using an improved cat swarm optimization algorithm,” Journal of the Nigerian Society of Physical Sciences, vol. 5, no. 4, Nov. 2023, doi: 10.46481/jnsps.2023.1007.

[20] A. Farhan AlShammari, “Implementation of Model Evaluation using Confusion Matrix in Python,” 2024. Accessed: May 26, 2025. [Online]. Available: https://www.researchgate.net/profile/Ahmad-Alshammari-8/publication/386292671_Implementation_of_Model_Evaluation_using_Confusion_Matrix_in_Python/links/674e3ac9790d154bf9bde0e3/Implementation-of-Model-Evaluation-using-Confusion-Matrix-in-Python.pdf

[21] O. Wilson, D. Schoeman, A. Bradley, and C. Clemente, “Practical guidelines for validation of supervised machine learning models in accelerometer‐based animal behaviour classification,” Journal of Animal Ecology, May 2025, doi: 10.1111/1365-2656.70054.

[22] L. A. Yates, Z. Aandahl, S. A. Richards, and B. W. Brook, “Cross validation for model selection: A review with examples from ecology,” Ecol Monogr, vol. 93, no. 1, Feb. 2023, doi: 10.1002/ecm.1557.

Published

2025/12/21

How to Cite

Muhammad Muttakin, Najwa Rokhan Rusmana, & ramadhani, dian. (2025). Analisis Perbandingan Algoritma Decision Tree, Random Forest, KNN, dan SVM Dalam Prediksi Penyakit Jantung. Journal of System & Technology (SYSTEC), 1(2), 35-42. https://systec.ejournal.unri.ac.id/index.php/systec/article/view/18

Similar Articles

You may also start an advanced similarity search for this article.