A cardiovascular event, commonly known as a heart attack, occurs when the blood flow to the heart muscle is abruptly obstructed. Medical research suggests that lifestyle choices primarily contribute to this cardiac issue. Additionally, various crucial factors serve as indicators, signaling whether an individual is at risk or not of experiencing a heart attack. This study aims to predict heart attack based on various Machine Learning (ML) algorithms and proposes an ensemble learning that can best predict heart attack than other models. Additionally provides the top features influencing to have heart attack. The dataset is collected from Kaggle, that contains 14 related features with heart attack. Several ML models including Logistic Regression (LR), Decision Tree (DT), Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Random Forest (RF), AdaBoost, Gradient Boosting Classifier (GBC) are utilized individually and by combining them four stacking ensemble model are created. Then the trained models are compared based on various metrices such as, accuracy, precision, recall, F1-score, and AUC values. Among the individual models RF, KNN, and LR proved best on the performance measures with accuracy 0.85 for these three. Overall, Stacking Ensemble 1 and Stacking Ensemble 3 outperformed others by achieving accuracy of 0.89 and AUC of 0.88 and leads to conclude that both are equally best. The feature importance reveals exang as the most critical factor contributes to heart attack followed by cp, ca, thal, and sex of the individuals.
Journal of Science and Technology University © All Rights Reserved.
Developed by IT Cell, HSTU, Dinajpur-5200.