Electronic Integrated Computer Algorithm Journal
Vol. 3 No. 1 (2025): VOLUME 3, NO 1: OCTOBER 2025

Heart Attack Risk Prediction Using Machine Learning: A Comparative Study of Decision Tree and K-Nearest Neighbors

Hizbullah, Fauzi (Unknown)
Noorachmad Muttaqin, Alif (Unknown)
Andiharsa Sih Setiarto, Rahardian (Unknown)
Aulia Hakim, Rizki (Unknown)
Abdulmana, Sahidan (Unknown)



Article Info

Publish Date
28 Oct 2025

Abstract

Heart disease, particularly heart attacks, is a leading cause of death worldwide, highlighting the importance of early detection and risk prediction. This study develops and evaluates machine learning models to predict heart attack risk using seven health-related attributes: age, marital status, gender, body weight category, cholesterol level, participation in stress management training, and stress level. The dataset, processed with the Orange Data Mining platform, was divided into training (66%) and testing (34%) sets. Two supervised algorithms, Decision Tree and K-Nearest Neighbors (K-NN), were implemented without extensive hyperparameter tuning. Model performance was evaluated using accuracy, precision, recall, and F1 score. The Decision Tree achieved the best results with 84.78% accuracy, 88.52% precision, 79.41% recall, and 83.72% F1 score, indicating its effectiveness in identifying at-risk individuals. Key predictors included age, stress level, and cholesterol, aligning with established medical findings. While the results are promising, limitations include a small dataset and limited algorithm scope. Future research should expand the dataset, include additional clinical features, and explore advanced algorithms to improve accuracy and reduce false negatives, enhancing applicability in preventive healthcare.

Copyrights © 2025






Journal Info

Abbrev

enigma

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Electrical & Electronics Engineering Social Sciences

Description

ENIGMA : Electronic Integrated Computer Algorithm Journal is open to researchers and experts in the fields of computer science, information engineering and information systems. This journal is a forum for researchers and experts to present the results of research related to the fields of computer ...