Alya Masitha
Institut Teknologi Statistika dan Bisnis Muhammadiyah

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Machine Learning Approach for Heart Failure Patient Classification Using K-Nearest Neighbors Algorithm Alya Masitha; Syahrani Lonang; Julia Mega Reski
Methods in Science and Technology Studies Vol. 1 No. 2 (2025): December Article in Process
Publisher : PT. Teknologi Futuristik Indonesia

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.64539/msts.v1i2.2025.44

Abstract

Heart failure is a cardiovascular disease with a high mortality rate and tends to increase every year. Therefore, a method is needed that can help the process of classifying heart failure quickly and accurately. This study aims to design and implement a heart failure classification system using the K-Nearest Neighbor (K-NN) machine learning method. The dataset used consists of 918 patient data with eleven input variables and two output classes, namely patients diagnosed with heart failure and patients not diagnosed with heart failure. The research stages include data loading, dividing training data and test data, implementing the K-NN algorithm with various K values, and evaluating model performance using accuracy, precision, recall, and F1-score metrics. The test results show that variations in the K value have a significant effect on the performance of the classification model. The K value = 9 produces the best performance with an accuracy of 93.48%, a recall of 96.36%, and an F1-score of 94.64%, which indicates a good balance between precision and recall. Based on these results, the K-NN method with a value of K = 9 is recommended as the optimal configuration in the classification of heart failure disease in this study.