Comparative analysis of machine learning algorithms for ECG-based heart attack prediction: A study using Bangladeshi patient data

Md Alif Sheakh 1, Mst. Sazia Tahosin 1, Lima Akter 2, *, Israt Jahan 3, Md Nakibul Islam 3, Md Rafiuddin Siddiky 4, Md Mahadi Hasan 3 and Sakibul Hasan 5

1 Department of Computer Science and Engineering, Daffodil International University, Dhaka, Bangladesh.
2 Department of Computer Science and Engineering, Atish Dipankar University of Science and Technology, Dhaka, Bangladesh.
3 Department of Information Technology, Washington University of Science and Technology, Virginia, USA.
4 Department of Information Systems Technology, Wilmington University, Delaware, USA.
5 Department of Civil Engineering, Chongqing University of Science and Technology, China.
 
Research Article
World Journal of Advanced Research and Reviews, 2024, 23(03), 2572–2584
Article DOI: 10.30574/wjarr.2024.23.3.2928
 
Publication history: 
Received on 18 August 2024; revised on 23 September 2024; accepted on 26 September 2024
 
Abstract: 
This study aims to identify the most accurate machine learning algorithm for predicting heart attacks using demographic data, physiological measurements, and electrocardiogram (ECG) results. We utilized a dataset of 4,000 patient records, combining data from DMCH and Kaggle. Our methodology involved comprehensive data preprocessing, including ECG noise removal and feature selection using the Brouta algorithm. We implemented and compared six machine learning algorithms: Decision Tree, Random Forest, Logistic Regression, Support Vector Machine, XGBoost, and K-Nearest Neighbors. The results demonstrate that our proposed method can accurately predict heart attacks with high sensitivity and specificity. Among the tested algorithms, Random Forest achieved the highest accuracy of 87%, with well-balanced precision (0.86), recall (0.85), and F1-score (0.87). K-Nearest Neighbors and XGBoost also showed strong performance, with accuracies of 81% and 80% respectively. This study contributes to the field by utilizing a large, diverse dataset and providing a comprehensive comparison of multiple algorithms. Our findings suggest the potential for integrating machine learning, particularly Random Forest models, into clinical practice for early heart attack risk assessment, representing a significant step towards improving cardiovascular care through advanced data analysis techniques.
 
Keywords: 
Heart attack; Cardiovascular; Heart disease prediction; Random forest; Electrocardiogram prediction
 
Full text article in PDF: 
Share this