Performance Comparison of Decision Tree and Random Forest Models Machine Learning Algorithms for Predicting Human Cardiovascular Diseases

Authors

  • Oluwasogo Adekunle Okunade National Open University of Nigeria
  • Adenrele Abolanle Afolorunso
  • Olawale Surajudeen Adebayo
  • Olayemi Mikail Olaniyi
  • Babatunde Seyi Olanrewaju
  • Oluwaseyifunmitan Osunade

Keywords:

ANOVA F-test, Artificial intelligence, Cardiovascular diseases (CVDs), Decision tree classifier, F1-score metrics, Random forest model

Abstract

Cardiovascular diseases (CVDs) remain a substantial source of mortality on a global scale, necessitating early illness prediction to implement preventative treatment. In this investigation, a decision tree-based model for predicting CVD risk is developed, and its performance is compared to that of a random forest classifier using the Framingham Heart Study dataset. The dataset includes demographic data, clinical measurements, and lifestyle characteristics, such as age, cholesterol levels, height, blood pressure, smoking habits, and body mass index (BMI). The methodology entailed data pre-processing, which included the use of the ANOVA F-test to determine relevant qualities, normalising numerical features, and addressing missing values. A decision tree classifier was trained and assessed using F1-score metrics, precision, recall, and accuracy. 76.18 per cent accuracy was reached using the decision tree model, with precision and recall values of 0.87 and 0.85 for class 0 (no disease) and 0.20, respectively. An 86% accuracy was reached using the random forest model, with precision and recall values of 0.86 and 0.99 for class 0 (no disease) and 0.62, respectively.

References

F. Asadi, R. Homayounfar, Y. Mehrali, C. Masci, S. Talebi, and F. Zayeri, “Detection of cardiovascular disease cases using advanced tree-based machine learning algorithms,” Scientific Reports, vol. 14, Sep. 2024, doi: https://doi.org/10.1038/s41598-024-72819-9

W. DeGroat, H. Abdelhalim, K. Patel, D. Mendhe, S. Zeeshan, and Z. Ahmed, “Discovering biomarkers associated and predicting cardiovascular disease with high accuracy using a novel nexus of machine learning techniques for precision medicine,” Scientific Reports, vol. 14, p. 1, Jan. 2024, doi: https://doi.org/10.1038/s41598-023-50600-8

D. D. Miller, “Machine intelligence in cardiovascular medicine,” Cardiology in Review, vol. 28, no. 2, pp. 53–64, 2020, doi: https://doi.org/10.1097/crd.0000000000000294

M. Peng et al., “Prediction of cardiovascular disease risk based on major contributing features,” Scientific Reports, vol. 13, Mar. 2023, doi: https://doi.org/10.1038/s41598-023-31870-8

E. Guldogan, F. H. Yagin, A. Pinar, C. Colak, S. Kadry, and J. Kim, “A proposed tree-based explainable artificial intelligence approach for the prediction of angina pectoris,” Scientific Reports, vol. 13, Dec. 2023, doi: https://doi.org/10.1038/s41598-023-49673-2

H. El-Sofany, B. Bouallegue, and Y. M. A. El-Latif, “A proposed technique for predicting heart disease using machine learning algorithms and an explainable AI method,” Scientific Reports, vol. 14, Oct. 2024, doi: https://doi.org/10.1038/s41598-024-74656-2

A.-D. Samaras, S. Moustakidis, I. D. Apostolopoulos, N. Papandrianos, and E. Papageorgiou, “Classification models for assessing coronary artery disease instances using clinical and biometric data: an explainable man-in-the-loop approach,” Scientific Reports, vol. 13, Apr. 2023, doi: https://doi.org/10.1038/s41598-023-33500-9

A. Ahmad, A. Husnain, A. Shiwlani, A. Hussain, M. N. Gondal, and A. Saeed, “Ethical and clinical implications of AI integration in cardiovascular healthcare,” World Journal of Advanced Research and Reviews, vol. 23, no. 3, pp. 2479–2501, Sep. 2024, doi: https://doi.org/10.30574/wjarr.2024.23.3.2907

J. O. Awoyemi, B. O. Awoyemi, T. A. Ugwu, A. M. Oluwasola, T. Oladokun and C. C. Ugwu, “Advanced feature engineering and sampling technique for effective heart disease prediction system using machine learning technique,” 2024 IEEE 5th International Conference on Electro-Computing Technologies for Humanity (NIGERCON), Ado Ekiti, Nigeria, 2024, pp. 1–5, doi: https://doi.org/10.1109/NIGERCON62786.2024.10927368

K. Ng and A. Rahman, “Genetics in relation to cardiac diseases: Implications for general practitioners,” Australian Journal of General Practice, vol. 53, no. 7, pp. 463–470, Jul. 2024, Available: https://search.informit.org/doi/epdf/10.3316/informit.T2024071000014190515511992

M. A. Naser, A. A. Majeed, M. Alsabah, T. R. Al-Shaikhli, and K. M. Kaky, “A review of machine learning’s role in cardiovascular disease prediction: Recent advances and future challenges,” Algorithms, vol. 17, no. 2, 2024, doi: https://doi.org/10.3390/a17020078

S. M. Srinivasan and V. Sharma, “Applications of AI in cardiovascular disease detection — A review of the specific ways in which AI is being used to detect and diagnose cardiovascular diseases,” in AI in Disease Detection: Advancements and Applications, R. Singh, A. Gehlot, N. Rathour, and S. V. Akram, Eds., The Institute of Electrical and Electronics Engineers, Inc., 2025, pp. 123–146.

F. Taheri et al., “Human genomics technology,” in A Glimpse at Medicine in the Future, M. Hasanzad, Ed., Singapore: Springer Nature , 2024.

H. A. Al-Alshaikh et al., “Comprehensive evaluation and performance analysis of machine learning in heart disease prediction,” Scientific Reports, vol. 14, Apr. 2024, doi: https://doi.org/10.1038/s41598-024-58489-7

B. Xia, N. Innab, V. Kandasamy, A. Ahmadian, and M. Ferrara, “Intelligent cardiovascular disease diagnosis using deep learning enhanced neural network with ant colony optimization,” Scientific Reports, vol. 14, Sep. 2024, doi: https://doi.org/10.1038/s41598-024-71932-z

S. V. Babu, P. Ramya, and J. Gracewell, “Revolutionizing heart disease prediction with quantum-enhanced machine learning,” Scientific reports, vol. 14, Mar. 2024, doi: https://doi.org/10.1038/s41598-024-55991-w

J. Lu et al., “Machine learning risk prediction model for acute coronary syndrome and death from use of non-steroidal anti-inflammatory drugs in administrative data,” Scientific Reports, vol. 11, Sep. 2021, doi: https://doi.org/10.1038/s41598-021-97643-3

S. Abbas et al., “Artificial intelligence framework for heart disease classification from audio signals,” Scientific Reports, vol. 14, Feb. 2024, doi: https://doi.org/10.1038/s41598-024-53778-7

A. U. Rahman, Y. Alsenani, A. Zafar, K. Ullah, K. M. Rabie, and T. Shongwe, “Enhancing heart disease prediction using a self-attention-based transformer model,” Scientific Reports, vol. 14, Jan. 2024, doi: https://doi.org/10.1038/s41598-024-51184-7

H.-G. Lee et al., “Machine learning approaches that use clinical, laboratory, and electrocardiogram data enhance the prediction of obstructive coronary artery disease,” Scientific Reports, vol. 13, Aug. 2023, doi: https://doi.org/10.1038/s41598-023-39911-y

G. M. Rao, D. Ramesh, V. Sharma, A. Sinha, M. M. Hassan, and A. H. Gandomi, “AttGRU-HMSI: Enhancing heart disease diagnosis using hybrid deep learning approach,” Scientific Reports, vol. 14, Apr. 2024, doi: https://doi.org/10.1038/s41598-024-56931-4

C. Bock et al., “Enhancing the diagnosis of functionally relevant coronary artery disease with machine learning,” Nature Communications, vol. 15, Jun. 2024, doi: https://doi.org/10.1038/s41467-024-49390-y

N. Niimi et al., “Machine learning models for prediction of adverse events after percutaneous coronary intervention,” Scientific Reports, vol. 12, Apr. 2022, doi: https://doi.org/10.1038/s41598-022-10346-1

G. Narasimhan and A. Victor, “Analysis of computational intelligence approaches for predicting disease severity in humans: Challenges and research guidelines,” Journal of Education and Health Promotion, vol. 1, Sep. 2023, doi: https://doi.org/10.4103/jehp.jehp_298_23

I. Atamanyuk, Y. Kondratenko, V. Havrysh, and Y. Volosyuk, “Computational method of the cardiovascular diseases classification based on a generalized nonlinear canonical decomposition of random sequences,” Scientific Reports, vol. 13, Jan. 2023, doi: https://doi.org/10.1038/s41598-022-27318-0

S. Menaga, G. Kalaiarasi, R. Vanithamani , and M. Nivetha, “ Data analytics for disease prediction,” in Machine Learning Algorithms for Intelligent Data Analytics, Technoarete Publishers, 2022.

Z. Fan et al., “Construct a classification decision tree model to select the optimal equation for estimating glomerular filtration rate and estimate it more accurately,” Scientific Reports, vol. 12, Sep. 2022, doi: https://doi.org/10.1038/s41598-022-19185-6

R. Nambo et al., “Prediction and causal inference of cardiovascular and cerebrovascular diseases based on lifestyle questionnaires,” Scientific Reports, vol. 14, May 2024, doi: https://doi.org/10.1038/s41598-024-61047-w

Published

2025-12-05

How to Cite

Okunade, O. A. ., Adenrele Abolanle Afolorunso, Olawale Surajudeen Adebayo, Olayemi Mikail Olaniyi, Babatunde Seyi Olanrewaju, & Oluwaseyifunmitan Osunade. (2025). Performance Comparison of Decision Tree and Random Forest Models Machine Learning Algorithms for Predicting Human Cardiovascular Diseases. International Journal of AI and Machine Learning Innovations in Electronics and Communication Technology, 1(2), 41–52. Retrieved from https://matjournals.net/engineering/index.php/IJAIMLECT/article/view/2792

Issue

Section

Articles