This is an outdated version published on 2025-06-14. Read the most recent version.

PDF Predicting Heart Attacks using Machine Learning with Multiple Models and Hard Voting to Improve Accuracy

Authors

  • ahmed hashim site Author

Keywords:

Heart Attack , Prediction , Accurate , Coronary

Abstract

Since heart attacks continue to be a leading cause of mortality globally, these numbers should encourage scientists to develop more effective methods of prevention and early detection.   Using clinical data as a starting point, we train and verify a model to forecast the likelihood of a heart attack using machine learning techniques.  Indicators of a patient's health form the basis of this concept.   The best classification model was chosen after extensive testing and evaluation of many models, such as logistic regression, decision trees, random forest, support vector machines (SVM), k-nearest neighbours (kNN), Naïve Bayes, and Extreme Gradient Boosting (XGBoost).   Feature scaling and encoding were applied to all 303 patients in the sample, who possessed a total of 14 distinct characteristics.   Two sets of data were created: one for training and one for testing, so that the models could be tested.   For every model, we determined the following metrics: ROC-AUC, F1-score, recall, accuracy, precision**, and precision.   By a wide margin, XGboost outperformed kNN and SVM classifiers with its 90.2% prediction accuracy.   Furthermore, we were able to train an ensemble voting classifier that achieved somewhat better results than the top individual model as well as its individual components.   According to feature significance analysis, the two most essential criteria in determining the likelihood of a heart attack are the "which type" of chest pain and the "what kind" of exercise-induced angina.   We go deeply into the models' inner workings, discussing the consequences of our discoveries and possible future enhancements.   By utilizing machine learning algorithms, medical professionals may improve their ability to foretell the likelihood of a cardiac event, which might result in more timely and effective treatment.   Future efforts to improve prediction performance could make advantage of more complete ensemble techniques, bigger datasets, and other characteristics.

Downloads

Published

2025-06-14

Versions