Skip to content
Open access

An Optimal Machine Learning Framework for Early Detection of Heart Disease

2026 · International journal of research and innovation in applied science · 0 citations

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.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.