This Heart attack is one of the leading causes of death worldwide and requires early diagnosis to reduce fatal risks. This study aims to compare the performance of the Naive Bayes and K-Nearest Neighbors (KNN) algorithms in classifying heart attack disease. The dataset used consists of medical records containing clinical parameters such as age, blood pressure, cholesterol level, and heart rate. The research methodology includes data preprocessing, splitting the dataset into training and testing sets, and evaluating performance using accuracy, precision, recall, and F1-score metrics. The results show that Naive Bayes demonstrates advantages in computational speed and performs well on smaller datasets, achieving an accuracy of 85%. In contrast, KNN provides better performance on larger datasets, reaching an accuracy of 90%, particularly when the optimal K value is applied. These findings indicate that algorithm selection for heart attack classification depends on dataset characteristics and specific implementation needs. This study is expected to contribute to the development of artificial intelligence–based clinical decision support systems for early heart attack diagnosis and improved healthcare outcomes.
Copyrights © 2026