COREAI: Jurnal Kecerdasan Buatan, Komputasi dan Teknologi Informasi
Vol 7, No 1 (2026): Sustainable Information Technology Innovation Supports a Digital-Based Smart Eco

Application of the K-Nearest Neighbor (KNN) Algorithm in Data Mining for Heart Disease Prediction

Nur Aida (UNIVERSITAS IBRAHIMY SITUBONDO)



Article Info

Publish Date
11 Jul 2026

Abstract

Cardiovascular (heart) disease is a leading cause of high global mortality rates. This is often exacerbated by low public awareness and limited access to cardiac screening facilities. To address these challenges, this study aims to apply the K-Nearest Neighbors (KNN) algorithm to classify heart disease and evaluate the resulting accuracy. The KNN algorithm was selected for its efficiency and ease of use in classifying large datasets; it works by measuring the distance between objects using the Euclidean distance formula. This classification model was built using RapidMiner 9.10 software. The data used was sourced from the Cleveland UCI Machine Learning Repository database available via Kaggle, consisting of a total of 303 patient records and characterized by 14 features used for prediction. The target variable (heart disease) was set as the classification label. Test results using cross-validation demonstrated that the KNN implementation is effective for predicting heart disease. This model achieved an accuracy of 64.03% with the parameter setting K=5. Further analysis of the confusion matrix identified 124 true-positive patients, with a maximum precision of 64.58%. Overall, these accuracy results confirm the potential and capability of the KNN method in classifying diagnostic data for heart disease patients.

Copyrights © 2026






Journal Info

Abbrev

core

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management Electrical & Electronics Engineering Mechanical Engineering Transportation

Description

COREAI: Jurnal Kecerdasan Buatan, Komputasi dan Teknologi Informasi sebagai bagian dari semangat menyebarluaskan ilmu pengetahuan beberapa hasil dari penelitian dan pemikiran untuk pengabdian kepada masyarakat luas. Situs Jurnal COREAI ini menyediakan artikel-artikel jurnal untuk dibaca maupun ...