Early Detection of Cardiovascular Disease Risk Using the K-Nearest Neighbors Algorithm - Leo Fernandy; Leonardo Leonardo; Stanley Lim; Vincent Liawis; Ade Maulana (JOMLAI: Journal of Machine Learning and Artificial Intelligence, 2026)
Health is a fundamental aspect in determining the quality of human life. Along with changes in lifestyle and environmental conditions, various new challenges have emerged in the healthcare sector. Technological advancements, particularly in artificial intelligence, have opened significant opportunities for the development of more accurate and efficient healthcare systems. One of the most rapidly growing applications of AI is machine learning for disease prediction. This study aims to develop a model for predicting the risk of cardiovascular disease using the K-Nearest Neighbors (KNN) algorithm. The “Cardiovascular Disease” dataset from Kaggle, consisting of 68,205 entries and 17 medical attributes, was used as the basis. The research stages included data preprocessing (cleaning, categorical transformation, and normalization), selection of key features, model training, and performance evaluation. The dataset was split into 80% training data and 20% testing data. The experiment showed that k = 41 achieved the highest accuracy of 73%. Evaluation using precision, recall, and f1-score indicated fairly good performance, particularly in identifying high-risk patients. This model has the potential to serve as a decision-support tool for early detection of cardiovascular disease, enabling more accurate and preventive medical actions..