An Optimal Machine Learning Framework for Early Detection of Heart Disease
Authors
Department of Mathematics, Nnamdi Azikiwe University, Awka, Nigeria (Nigeria)
Department of Mathematics, Nnamdi Azikiwe University, Awka, Nigeria (Nigeria)
Department of Mathematics, Nnamdi Azikiwe University, Awka, Nigeria (Nigeria)
Article Information
DOI: 10.51584/IJRIAS.2026.11080198
Subject Category: Applied Mathematics
Volume/Issue: 11/8 | Page No: 2712-2719
Publication Timeline
Submitted: 2026-09-11
Accepted: 2026-09-16
Published: 2026-09-27
Abstract
Heart disease remains a major cause of mortality worldwide, creating a need for reliable early-risk identification. This study developed a cost-sensitive machine learning decision framework using 319,795 observations from the 2020 Behavioral Risk Factor Surveillance System (BRFSS) dataset. The cleaned dataset contained 18 predictor variables and a binary heart-disease outcome, with heart disease reported by 8.6% of respondents. Logistic Regression, Decision Tree, and Random Forest models were trained after Synthetic Minority Over sampling Technique (SMOTE) was applied to the training set. Performance was evaluated using accuracy, recall, precision, F1-score, and Matthews Correlation Coefficient (MCC). Random Forest achieved the highest accuracy (85.19%) but had low recall (30.56%). Logistic Regression achieved 69.78% recall, whereas the Decision Tree achieved 72.70% accuracy, 69.06% recall, 30.67% F1score, and the highest MCC (0.2581). Confusion-matrix analysis showed that the Decision Tree detected 3,862 heart-disease cases with 15,729 false positives, while Logistic Regression detected 3,902 cases but produced 17,430 false positives. A Bayesian cost-sensitive analysis assigned a false-negative cost ten times the false-positive cost and identified an optimal Decision Tree threshold of 0.36. The findings indicate that predictive accuracy alone is insufficient for imbalanced clinical screening and that an interpretable model combined with cost-sensitive threshold selection can provide a more balanced decision-support framework.
Keywords
heart disease; machine learning; decision tree; random forest
Downloads
References
1. Alizadehsani, R., Roshanzamir, M., Abdar, M., Beykikhoshk, A., Khosravi, A., Panahiazar, M., Koohestani, A., Khozeimeh, F., Nahavandi, S., & Sarrafzadegan, N. (2019).A data base for usisng machine learning and data mining techniques for coronary artery disease diagnosis.Scientific Data, 6,227. [Google Scholar] [Crossref]
2. Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32. [Google Scholar] [Crossref]
3. Centers for Disease Control and Prevention. (2020). Behavioral Risk Factor Surveillance System survey data. U.S. Department of Health and Human Services, CDC. [Google Scholar] [Crossref]
4. Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic minority over-sampling technique. Journal of Artificial Intelligence Research, 16, 321–357. [Google Scholar] [Crossref]
5. Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics, 21(1), 6. [Google Scholar] [Crossref]
6. Elkan, C. (2001). The foundations of cost-sensitive learning. In Proceedings of the International Joint Conference on Artificial Intelligence (pp. 973–978). [Google Scholar] [Crossref]
7. Krittanawong, C., Johnson, K. W., Rosenson, R. S., Wang, Z., Aydar, M., Baber, U., Min, J. K., Tang, W. H. W., Halperin, J. L., & Narayan, S. M. (2019). Deep learning for cardiovascular medicine: A practical primer. European Heart Journal, 40(25), 2058– 2073. [Google Scholar] [Crossref]
8. Rajkomar, A., Dean, J., & Kohane, I. (2019). Machine learning in medicine. New England Journal of Medicine, 380(14), 1347–1358. [Google Scholar] [Crossref]
9. Rudin, C. (2019). Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1(5), 206–215. [Google Scholar] [Crossref]
10. Vickers, A. J., & Elkin, E. B. (2006). Decision curve analysis: A novel method for evaluating prediction models. Medical Decision Making, 26(6), 565–574. [Google Scholar] [Crossref]
11. World Health Organization. (2017). Cardiovascular diseases. World Health Organization. [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- Applied Partial Differential Equation Modeling of Grating-Based Devices for Enhanced Sensing and Monitoring in the Petroleum and Gas Industry
- Analysis of Critical Path Method (CPM) To Optimized Project Scheduling
- Boussinesq Navier Stokes to A Modification on the Lorenz-63 Model
- Evaluating Time-Series Models for Dengue Haemorrhagic Fever Prediction: Arima vs. Sarima and Exponential Smoothing
- A Projected Steepest-Descent Algorithm for the Nonlinear Constrained Optimization of Football Team Performance