Performance Comparison of Supervised Learning Algorithms in Heart Disease Risk Classification

Authors

  • Fatimah Azzahra Universitas Islam Negeri Sultan Syarif Kasim Riau, Indonesia
  • Muhammad Rafiq Pohan Universitas Islam Negeri Sultan Syarif Kasim Riau, Indonesia
  • Ainul Mardhiah Binti Mohammed Rafiq International Islamic University Malaysia, Malaysia
  • Imran Hazim Bin Abdullah Salim International Islamic University Malaysia, Malaysia
  • Azwa Nurnisya Binti Ayub International Islamic University Malaysia, Malaysia
  • Nuralya Medina Binti Mohammad Nizam International Islamic University Malaysia, Malaysia

DOI:

https://doi.org/10.57152/predatecs.v4i1.1856

Keywords:

Heart Disease, Machine Learning, Model Evaluation, Random Forest, Supervised Learning

Abstract

Heart disease is one of the leading causes of death worldwide, so early diagnosis is essential for effective treatment and prevention. This study evaluates the performance of five machine learning algorithms, namely Decision Tree, Naive Bayes, K-Nearest Neighbors (K-NN), Random Forest, and Support Vector Machine (SVM), using a heart disease dataset obtained from Kaggle. The dataset comprises 14 variables, including 13 attributes and 1 target variable. The models were tested on data split ratios of 70:30, 80:20, and 90:10, with performance measured by accuracy, precision, recall, and F1-score. The results showed that Random Forest performed best, achieving the highest accuracy of 98.54% at the 80:20 ratio. Decision Trees followed, yielding similar results, while K-NN performed the best at the 90:10 ratio, with a precision of 100%. In contrast, Naive Bayes performed lower due to high false positives. These results are in line with previous studies, confirming the effectiveness of Random Forest and Decision Trees in predicting heart disease risk. This research contributes to the development of reliable machine-learning models for early diagnosis and risk assessment of heart disease.

References

K. M. Almustafa, “Prediction of heart disease and classifiers ’ sensitivity analysis,” pp. 1–18, 2020.

M. Ozcan and S. Peker, “Healthcare Analytics A classification and regression tree algorithm for heart disease modeling and prediction,” Healthc. Anal., vol. 3, no. July 2022, p. 100130, 2023, doi: 10.1016/j.health.2022.100130.

M. Amine et al., “Heliyon Early heart disease prediction using feature engineering and machine learning algorithms,” Heliyon, vol. 10, no. 19, p. e38731, 2024, doi: 10.1016/j.heliyon.2024.e38731.

G. Manikandan, B. Pragadeesh, V. Manojkumar, A. L. Karthikeyan, and R. Manikandan, “Informatics in Medicine Unlocked Classification models combined with Boruta feature selection for heart disease prediction,” Informatics Med. Unlocked, vol. 44, no. August 2023, p. 101442, 2024, doi: 10.1016/j.imu.2023.101442.

T. A. Gaziano, A. Bitton, S. Anand, S. Abrahams-gessel, and A. Murphy, “Growing Epidemic of Coronary Heart Disease in Low- and Middle-Income Countries,” YMCD, vol. 35, no. 2, pp. 72–115, 2010, doi: 10.1016/j.cpcardiol.2009.10.002.

L. Mohammed, S. Zafar, L. Mohammed, S. Akoosh, L. Mohammed, and S. Akoosh, “ScienceDirect Anticipating the Nearness of Coronary Heart Infection Anticipating the Nearness of Coronary Heart Infection Anticipating the Nearness of Coronary Heart Infection Anticipating the Nearness of Coronary Heart Infection Utilizing Machine Learning Classifiers Utilizing Machine Learning Classifiers Utilizing Machine Learning Classifiers Utilizing Learning Classifiers Salem Machine,” Procedia Comput. Sci., vol. 235, pp. 2619–2629, 2024, doi: 10.1016/j.procs.2024.04.247.

M. G. El-shafiey and A. Hagag, “A hybrid GA and PSO optimized approach for heart-disease prediction based on random forest,” pp. 18155–18179, 2022.

Z. Ying, G. Zhang, Z. Pan, C. Chu, and X. Liu, “FedECG?: A federated semi-supervised learning framework for electrocardiogram abnormalities prediction,” J. King Saud Univ. - Comput. Inf. Sci., vol. 35, no. 6, p. 101568, 2023, doi: 10.1016/j.jksuci.2023.101568.

M. Ali et al., “Heart disease prediction using supervised machine learning algorithms?: Performance analysis and comparison,” Comput. Biol. Med., vol. 136, no. July, p. 104672, 2021, doi: 10.1016/j.compbiomed.2021.104672.

V. Chang, V. Rupa, A. Qianwen, and M. A. Hossain, “Healthcare Analytics An artificial intelligence model for heart disease detection using machine learning algorithms,” Healthc. Anal., vol. 2, no. September 2021, p. 100016, 2022, doi: 10.1016/j.health.2022.100016.

K. Sumwiza, C. Twizere, G. Rushingabigwi, and P. Bakunzibake, “Informatics in Medicine Unlocked Enhanced cardiovascular disease prediction model using random forest algorithm,” Informatics Med. Unlocked, vol. 41, no. August, p. 101316, 2023, doi: 10.1016/j.imu.2023.101316.

M. Minnoor and V. Baths, “ScienceDirect ScienceDirect Diagnosis of Breast Cancer Using Random Forests Diagnosis of Breast Cancer Using Random Forests,” Procedia Comput. Sci., vol. 218, no. 2022, pp. 429–437, 2023, doi: 10.1016/j.procs.2023.01.025.

A. Bilal et al., “Classification and monitoring of arm exercises using machine learning and wrist-worn band,” vol. 27, no. September, 2024, doi: 10.1016/j.eij.2024.100534.

B. O. Support, “Informatics in Medicine Unlocked learning prospective,” vol. 26, 2021, doi: 10.1016/j.imu.2021.100696.

N. V. S, D. Sripada, V. Sugumaran, and M. Aghaei, “Heliyon Detection of visual faults in photovoltaic modules using a stacking ensemble approach,” Heliyon, vol. 10, no. 6, p. e27894, 2024, doi: 10.1016/j.heliyon.2024.e27894.

C. Series, “Prediction on Cardiovascular disease using Decision tree and Naïve Bayes classifiers Prediction on Cardiovascular disease using Decision tree and Naïve Bayes classifiers”, doi: 10.1088/1742-6596/2161/1/012015.

E. Heart, D. Prediction, U. Machine, and L. Techniques, “Learning Techniques,” 2023.

A. Zriqat, A. M. Altamimi, and M. Azzeh, “A Comparative Study for Predicting Heart Diseases Using Data Mining Classification Methods,” vol. 14, no. 12, pp. 868–879, 2016.

S. Srinivasan, S. Gunasekaran, S. K. Mathivanan, B. A. M. M. B, P. Jayagopal, and G. T. Dalu, “An active learning machine technique based prediction of cardiovascular heart disease from UCI ? repository database,” Sci. Rep., pp. 1–19, 2023, doi: 10.1038/s41598-023-40717-1.

U. Boosting and E. Techniques, “Using Boosting Ensemble Techniques,” pp. 1–22, 2024.

J. B. Raja and S. C. Pandian, “Computer Methods and Programs in Biomedicine PSO-FCM based data mining model to predict diabetic disease,” vol. 196, 2020, doi: 10.1016/j.cmpb.2020.105659.

T. Islam, M. Raihan, F. Farzana, N. Aktar, P. Ghosh, and S. Kabiraj, “Typical and Non-Typical Diabetes Disease Prediction using Random Forest Algorithm,” pp. 1–6, 2020.

A. Putri et al., “Komparasi Algoritma K-NN, Naive Bayes dan SVM untuk Prediksi Kelulusan Mahasiswa Tingkat Akhir,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 3, no. 1, pp. 20–26, 2023, doi: 10.57152/malcom.v3i1.610.

J. M. Gonzalez-cava, J. A. Reboso, J. L. Casteleiro-roca, J. L. Calvo-rolle, J. Albino, and M. Pérez, “A Novel Fuzzy Algorithm to Introduce New Variables in the Drug Supply Decision-Making Process in Medicine,” vol. 2018, 2018, doi: 10.1155/2018/9012720.

A. Sinha, B. Rout, S. Mohanty, S. R. Mishra, H. Mohapatra, and S. Dey, “ScienceDirect Exploring Exploring Sentiments Sentiments in in the the Russia-Ukraine Russia-Ukraine Conflict?: Conflict?: A Comparative Analysis of K-NN , Decision Tree And Logistic Comparative Analysis of K-NN , Decision Tree And Logistic Regression Machine Machine Learning Learning Classifiers .,” Procedia Comput. Sci., vol. 235, pp. 1068–1076, 2024, doi: 10.1016/j.procs.2024.04.101.

D. Colledani, P. Anselmi, and E. Robusto, “Machine learning-decision tree classifiers in psychiatric assessment?: An application to the diagnosis of major depressive disorder,” Psychiatry Res., vol. 322, no. October 2022, p. 115127, 2023, doi: 10.1016/j.psychres.2023.115127.

A. F. Lubis, H. Z. Haq, I. Lestari, and M. Iltizam, “Classification of Diabetes Mellitus Sufferers Eating Patterns Using K-Nearest Neighbors , Naïve Bayes and Decission Tree,” vol. 2, no. July, pp. 44–51, 2024.

O. Peretz, M. Koren, and O. Koren, “Engineering Applications of Artificial Intelligence Naive Bayes classifier – An ensemble procedure for recall and precision enrichment,” Eng. Appl. Artif. Intell., vol. 136, no. PB, p. 108972, 2024, doi: 10.1016/j.engappai.2024.108972.

T. Kim and J. Lee, “Exponential Loss Minimization for Learning Weighted Naive Bayes Classifiers,” IEEE Access, vol. 10, pp. 22724–22736, 2022, doi: 10.1109/ACCESS.2022.3155231.

S. Farhana, “ScienceDirect ScienceDirect Classification of Academic Performance for University Research Evaluation by Implementing Modified Naive Bayes Algorithm,” Procedia Comput. Sci., vol. 194, pp. 224–228, 2021, doi: 10.1016/j.procs.2021.10.077.

R. Ehsani and F. Drabløs, “Robust Distance Measures for k NN Classification of Cancer Data,” 2020, doi: 10.1177/1176935120965542.

O. Bouattane, “Atherosclerosis disease prediction using Supervised Machine Learning Techniques,” 2020.

S. Asadi, S. Roshan, and M. W. Kattan, “Random forest swarm optimization-based for heart diseases diagnosis,” J. Biomed. Inform., vol. 115, no. January, p. 103690, 2021, doi: 10.1016/j.jbi.2021.103690.

G. Obaido et al., “Machine Learning with Applications Supervised machine learning in drug discovery and development?: Algorithms , applications , challenges , and prospects,” Mach. Learn. with Appl., vol. 17, no. July, p. 100576, 2024, doi: 10.1016/j.mlwa.2024.100576.

R. T. Aruleba et al., “COVID-19 Diagnosis?: A Review of Rapid Antigen , RT-PCR and Artificial Intelligence Methods,” pp. 1–18, 2022.

S. I. Ayon, M. Islam, R. Hossain, M. Islam, and R. Hossain, “Coronary Artery Heart Disease Prediction?: A Comparative Study of Coronary Artery Heart Disease Prediction?: A Comparative Study of Computational Intelligence Techniques,” IETE J. Res., vol. 0, no. 0, pp. 1–20, 2020, doi: 10.1080/03772063.2020.1713916.

N. Mohammadi, M. Esteki, and J. Simal-gandara, “Machine learning for authentication of black tea from narrow-geographic origins?: Combination of PCA and PLS with LDA and SVM classifiers,” LWT, vol. 203, no. June, p. 116401, 2024, doi: 10.1016/j.lwt.2024.116401.

M. Libnao, M. Misula, C. Andres, J. Mariñas, and J. Mariñas, “ScienceDirect Procedia ScienceDirect Traffic incident prediction and classification system using naïve Traffic incident prediction and algorithm classification system using naïve bayes bayes algorithm,” Procedia Comput. Sci., vol. 227, pp. 316–325, 2023, doi: 10.1016/j.procs.2023.10.530.

K. Moulaei, M. Shanbehzadeh, Z. M. Taghiabad, and H. K. Arpanahi, “Comparing machine learning algorithms for predicting COVID ? 19 mortality,” BMC Med. Inform. Decis. Mak., vol. 0, pp. 1–12, 2022, doi: 10.1186/s12911-021-01742-0.

P. F. Pratama, D. Rahmadani, R. S. Nahampun, D. Harmutika, A. Rahmadeyan, and M. F. Evizal, “Random Forest Optimization Using Particle Swarm Optimization for Diabetes Classification,” Public Res. J. Eng. Data Technol. Comput. Sci., vol. 1, no. 1, pp. 41–46, 2023, doi: 10.57152/predatecs.v1i1.809.

E. Helmud, E. Helmud, and P. Romadiana, “Classification Comparison Performance of Supervised Machine Learning Random Forest and Decision Tree Algorithms Using Confusion Matrix,” vol. 13, pp. 92–97, 2024.

Z. C. Dwinnie, L. Khairani, M. A. M. Putri, J. Adhiva, and M. I. F. Tsamarah, “Application of the Supervised Learning Algorithm for Classification of Pregnancy Risk Levels,” Public Res. J. Eng. Data Technol. Comput. Sci., vol. 1, no. 1, pp. 26–33, 2023, doi: 10.57152/predatecs.v1i1.806.

F. Duran et al., “Perbandingan Kinerja Algoritma Random Florest Classifier,” vol. 3A, no. 2, pp. 98–103, 2024.

A. P. Jawalkar, P. Swetcha, N. Manasvi, P. Sreekala, and S. Aishwarya, “Early prediction of heart disease with data analysis using supervised learning with stochastic gradient boosting,” J. Eng. Appl. Sci., pp. 1–18, 2023, doi: 10.1186/s44147-023-00280-y.

R. Ehsani and F. Drabløs, “Robust Distance Measures for k NN Classification of Cancer Data,” 2020, doi: 10.1177/1176935120965542.

Downloads

Published

2026-08-01

How to Cite

Azzahra, F., Pohan, M. R., Rafiq, A. M. B. M., Salim, . I. H. B. A., Ayub, A. N. B., & Nizam, N. M. B. M. (2026). Performance Comparison of Supervised Learning Algorithms in Heart Disease Risk Classification. Public Research Journal of Engineering, Data Technology and Computer Science, 4(1), 1-13. https://doi.org/10.57152/predatecs.v4i1.1856