Importance of balanced datasets with feature selection and ensemble methods on heart disease classification using distinctive machine learning techniques: a comparative analysis

Heart disease, a leading cause of death worldwide, accounts for 31% of global fatalities and requires effective early detection methods to combat its rising prevalence. Early detection and prediction of heart disease remain one of the most pressing challenges in current healthcare. In recent years, machine learning (ML) technologies have offered opportunities to address these inequities by improving heart disease detection and prediction capabilities. This study offers a comparative evaluation of seven machine learning models: Logistic Regression (LR), Decision Tree (DT), Random Forest (RF), Naïve Bayes (NB), Support Vector Machine (SVM), Artificial Neural Networks (ANN), and K-Nearest Neighbors (KNN) for classifying heart disease. Using the ‘BRFSS 2020 Heart Disease Dataset’, this research examines the effects of dataset balancing with various feature selection techniques and an ensemble method with bagging on classification and prediction accuracy. Three feature selection methods ANOVA, Chi-Square, and Regression Analysis were tested through eight different combinations based on union and intersection of these methods: (i) {ANOVA ∪ Chi-Square}, (ii) {ANOVA ∪ Regression}, (iii) {Chi-Square ∪ Regression}, (iv) {ANOVA ∪ Chi-Square ∪ Regression}, (v) {ANOVA ∩ Chi-Square}, (vi) {ANOVA ∩ Regression}, (vii) {Chi-Square ∩ Regression}, and (viii) {ANOVA ∩ Chi-Square ∩ Regression}. Experimental results demonstrate that with a balanced dataset, RF and DT achieved the highest accuracies of 85% and 82%, respectively. Besides, the outcome of the balanced dataset incorporating feature selection techniques indicates that ANOVA-based feature selection was associated with higher performance under the {ANOVA ∪ Chi-Square} and {ANOVA ∪ Chi-Square ∪ Regression} feature combinations, where RF reached the highest accuracy (92%), recall (93%), and AUC score (0.92). Additionally, bagging-based ensemble techniques improved performance for certain high-variance models (DT, RF, and ANN) when applied to the balanced dataset, although the impact varied across models. Despite promising accuracy with dataset balancing incorporating an ensemble method, the recall and AUC scores were relatively low, indicating many positive cases were missing. Consequently, dataset balancing combined with feature selection techniques showed comparatively improved performance across several evaluation metrics under the specific experimental setup. These findings provide comparative insights into preprocessing strategies and optimal machine learning models for heart disease classification, which would be helpful for future research.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-04-07
DOI
https://doi.org/10.1038/s41598-026-47691-4
Primary Topic
Artificial Intelligence in Healthcare
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Importance of balanced datasets with feature selection and ensemble methods on heart disease classification using distinctive machine learning techniques: a comparative analysis

Hanif Bhuiyan, Jinat Ara, Abrar Shadman Mohammad Nahin, Isfara Islam Roza
Scientific Reports
Artificial Intelligence in Healthcare
article

Importance of balanced datasets with feature selection and ensemble methods on heart disease classification using distinctive machine learning techniques: a comparative analysis

Hanif Bhuiyan, Jinat Ara, Abrar Shadman Mohammad Nahin, Isfara Islam Roza
article en

Abstract

Heart disease, a leading cause of death worldwide, accounts for 31% of global fatalities and requires effective early detection methods to combat its rising prevalence. Early detection and prediction of heart disease remain one of the most pressing challenges in current healthcare. In recent years, machine learning (ML) technologies have offered opportunities to address these inequities by improving heart disease detection and prediction capabilities. This study offers a comparative evaluation of seven machine learning models: Logistic Regression (LR), Decision Tree (DT), Random Forest (RF), Naïve Bayes (NB), Support Vector Machine (SVM), Artificial Neural Networks (ANN), and K-Nearest Neighbors (KNN) for classifying heart disease. Using the ‘BRFSS 2020 Heart Disease Dataset’, this research examines the effects of dataset balancing with various feature selection techniques and an ensemble method with bagging on classification and prediction accuracy. Three feature selection methods ANOVA, Chi-Square, and Regression Analysis were tested through eight different combinations based on union and intersection of these methods: (i) {ANOVA ∪ Chi-Square}, (ii) {ANOVA ∪ Regression}, (iii) {Chi-Square ∪ Regression}, (iv) {ANOVA ∪ Chi-Square ∪ Regression}, (v) {ANOVA ∩ Chi-Square}, (vi) {ANOVA ∩ Regression}, (vii) {Chi-Square ∩ Regression}, and (viii) {ANOVA ∩ Chi-Square ∩ Regression}. Experimental results demonstrate that with a balanced dataset, RF and DT achieved the highest accuracies of 85% and 82%, respectively. Besides, the outcome of the balanced dataset incorporating feature selection techniques indicates that ANOVA-based feature selection was associated with higher performance under the {ANOVA ∪ Chi-Square} and {ANOVA ∪ Chi-Square ∪ Regression} feature combinations, where RF reached the highest accuracy (92%), recall (93%), and AUC score (0.92). Additionally, bagging-based ensemble techniques improved performance for certain high-variance models (DT, RF, and ANN) when applied to the balanced dataset, although the impact varied across models. Despite promising accuracy with dataset balancing incorporating an ensemble method, the recall and AUC scores were relatively low, indicating many positive cases were missing. Consequently, dataset balancing combined with feature selection techniques showed comparatively improved performance across several evaluation metrics under the specific experimental setup. These findings provide comparative insights into preprocessing strategies and optimal machine learning models for heart disease classification, which would be helpful for future research.

Scientific ReportsVol. 16(1)
Ahsanullah University of Science and Technology (BD), University of Pannonia (HU), Gold Coast City Council (AU)
Pannon Egyetem
Good health and well-being
Openalex Percentile: Top 29%
Artificial Intelligence in Healthcare
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.