Implementation of Machine Learning Algorithm for Heart Attack Disease Prediction - Febbi Ardiani; Irma Fitriani; Nabil Gustian; Meliani Putri Diamon Chandra; Hasna Uzakiyah (IJATIS: Indonesian Journal of Applied Technology and Innovation Science, 2025)
Heart attack disease is one of the leading causes of death worldwide, making early detection a critical factor in reducing mortality. However, manual prediction is often inaccurate due to the complexity of medical data. To address this issue, this study evaluates five machine learning algorithms K-Nearest Neighbors (KNN), Decision Tree, Naïve Bayes, Random Forest, and Support Vector Machine (SVM) for predicting heart attack risk. The dataset, obtained from Kaggle, was preprocessed and divided into training and testing sets using 70:30 and 80:20 ratios. Algorithm performance was assessed using accuracy, precision, recall, and F1-score. The results showed that Decision Tree and Random Forest achieved the best performance with accuracy up to 97.98%, while KNN recorded the lowest accuracy at around 61.36%. This study not only demonstrates the comparative effectiveness of these algorithms on the same dataset, contributing to the growing body of research on AI in healthcare, but also highlights their potential clinical utility. In particular, Decision Tree and Random Forest can support the development of AI-based clinical decision support systems to assist healthcare professionals in early diagnosis and risk management