Machine Learning Based Heart Attack Risk Prediction Using Clinical and Lifestyle Features

Authors

  • salah ammar Anbar Governorate Office Author

DOI:

https://doi.org/10.65204/djes.v3i2.714

Keywords:

Heart Attack Prediction , Cardiovascular Risk , Healthcare Analytics , Machine Learning , Random Forest (RF) , Predictive Modeling

Abstract

The research paper describes the machine learning-based prediction of heart attack to offer information on heart dynamics and the most important predictive variables. The dataset used was the Heart Attack Risk Prediction Dataset on Kaggle and it consisted of 8,763 records of patients with various patient attributes including age, cholesterol, blood pressure and lifestyle-related variables. Other machine learning models such as Support Vector Machine (SVM), Decision Tree and Random Forest (RF) were developed and tested. After preprocessing of the data, feature extraction and the model training, the SVM, Decision Tree, and the Random Forest models had the following accuracy: 0.86, 0.79, and 89 percent, respectively. Detailed classification reports and confusion matrices were used to support the performance evaluation to get a further understanding of the strengths and weaknesses of each model. The findings reveal that the Random Forest model was the most effective as compared to the other methods, which implies that it can be used to identify complicated trends in the data. Limitations of the models and future research directions are also addressed in the research with the emphasis on the opportunities of machine learning methods in preventing heart diseases in advance and risk assessment in individuals. On the whole, the given research can lead to the improvement of cardiovascular health prediction and can be a basis of the further development of predictive analytics in the healthcare system.

References

M. Raihan et al., “Risk Prediction of Ischemic Heart Disease Using Artificial Neural Network,” 2nd International Conference on Electrical, Computer and Communication Engineering, ECCE 2019, Apr. 2019, doi: 10.1109/ECACE.2019.8679362.

R. El-Bialy, M. A. Salamay, O. H. Karam, and M. E. Khalifa, “Feature Analysis of Coronary Artery Heart Disease Data Sets,” Procedia Comput Sci, vol. 65, pp. 459–468, 2015, doi: 10.1016/J.PROCS.2015.09.132.

M. Djerioui, Y. Brik, M. Ladjal, and B. Attallah, “Neighborhood component analysis and support vector machines for heart disease prediction,” Ingenierie des Systemes d’Information, vol. 24, no. 6, pp. 591–595, 2019, doi: 10.18280/ISI.240605.

“An Efficient SMOTE-Based Deep Learning Model for Heart Attack Prediction.” Accessed: Mar. 14, 2024. [Online]. Available: https://www.hindawi.com/journals/sp/2021/6621622/.

W. Zheng and M. Jin, “The Effects of Class Imbalance and Training Data Size on Classifier Learning: An Empirical Study,” SN Comput Sci, vol. 1, no. 2, Mar. 2020, doi: 10.1007/S42979-020-0074-0.

Dai, S., Meng, F., Dai, H., Wang, Q., Chen, X., Bai, W., ... & Liu, J. (2026). Machine learning in peak demand forecasting: foundations, trends, and insights. Renewable and Sustainable Energy Reviews, 227, 116500.

M. A. S. Al-Hitawi, A. L. Alzaidy, M. A. Alazaizi, and M. A. Tharthar, “Toolkit for Generating and Augmenting Hungarian Handwritten Text Recognition Dataset,” Dijlah J. Eng. Sci., vol. 3, no. 1, 2026.

Yue, Y., Ji, S., Yin, W., Wang, Y., Huang, W., Pan, C., ... & Cheng, Y. (2026). Development of wear condition diagnosis model for main bearing with SVM algorithm. International Journal of Engine Research, 27(1), 139-155.

Ferreira, R. C., Dunn‐Lopez, K., Moorhead, S., Krupp, A., Zuchatti, B. V., Carvalho, L. A. C., ... & Duran, E. C. M. (2026). Decision Trees for Managing Impaired Physical Mobility in Multiple Trauma Patients. Journal of advanced nursing, 82(2), 1359-1370.

S. F. Weng, J. Reps, J. Kai, J. M. Garibaldi, and N. Qureshi, “Can machine-learning improve cardiovascular risk prediction using routine clinical data?” PLOS ONE, vol. 12, no. 4, pp. 1–14, 2017, doi: 10.1371/journal.pone.0174944.

G. Mandair et al., “Prediction of incident myocardial infarction using machine learning applied to harmonized electronic health record data,” BMC Medical Informatics and Decision Making, vol. 20, no. 1, pp. 1–12, 2020, doi: 10.1186/s12911-020-01268-x.

N. Salet et al., “Using machine learning to predict acute myocardial infarction and ischemic heart disease in primary care cardiovascular patients,” PLOS ONE, vol. 19, no. 4, pp. 1–16, 2024, doi: 10.1371/journal.pone.0307099.

F. Commandeur et al., “Machine learning to predict the long-term risk of myocardial infarction and cardiac death based on clinical risk, coronary calcium, and epicardial adipose tissue: A prospective study,” Cardiovascular Research, vol. 116, no. 14, pp. 2216–2225, 2020, doi: 10.1093/cvr/cvz321.

J. C. Weiss et al., “Machine learning for personalized medicine: Predicting primary myocardial infarction from electronic health records,” AI Magazine, vol. 33, no. 4, pp. 33–45, 2012, doi: 10.1609/aimag.v33i4.2438.

T. Pezel et al., “A machine learning model using cardiac CT and MRI data predicts cardiovascular events in obstructive coronary artery disease,” Radiology, vol. 305, no. 1, pp. 1–11, 2025, doi: 10.1148/radiol.233030.

J. Emakhu et al., “Acute coronary syndrome prediction in emergency care: A machine learning approach,” Computer Methods and Programs in Biomedicine, vol. 225, p. 107080, 2022, doi: 10.1016/j.cmpb.2022.107080.

N. A. Mohammed, et al., “Recognizing Phishing in Emails by Using Natural Language Processing & Machine Learning Techniques,” in 2025 3rd International Conference on Cyber Resilience (ICCR), 2025, doi:10.1109/ICCR67387.2025.11292212.

M. Sraitih et al., “A robustness evaluation of machine learning algorithms for ECG myocardial infarction detection,” Journal of Clinical Medicine, vol. 11, no. 17, p. 4935, 2022, doi: 10.3390/jcm11174935.

I. Boudali et al., “A predictive approach for myocardial infarction risk assessment using machine learning and big clinical data,” Healthcare Analytics, vol. 5, p. 100319, 2024, doi: 10.1016/j.health.2024.100319.

M. A. S. Al-Hitawi and G. N. Máté, “Enhancing Transformer-Based Language Models for Hungarian Handwritten Text Recognition,” F1000Research, vol. 15, p. 181, 2026, doi: 10.12688/f1000research.176408.1.

V. C. Kurucz et al., “Prediction of emergency department presentations for acute coronary syndrome using a machine learning approach,” Scientific Reports, vol. 14, no. 1, p. 23125, 2024, doi: 10.1038/s41598-024-73291-1.

Downloads

Published

2026-06-17