Comparison Of The Effectiveness Of K-Nearest Neighbor (KNN) And Naive Bayes Algorithms In Identifying Diabetes Patients

Delay in diagnosis of diabetes is one of the causes of increasing mortality due to complications before diagnosis is made. In the medical field, the application of machine learning models has opened up significant opportunities in improving the accuracy of early diagnosis of diabetes. This study aims to compare the performance of the K-Nearest Neighbors (KNN) and Naive Bayes Classifier (NBC) algorithms using a secondary dataset of 128 data records and containing 10 data variables relevant to the prediction of diabetes. The results of the analysis show that the KNN algorithm with parameters K = 21 based on the evaluation of the confusion matrix obtained an accuracy of 76.92%, recall 100%, precision 72% and F1-Score 84%. Meanwhile, the naïve Bayes algorithm obtained an accuracy of 65.63%, recall 52%, precision 100% and F1-Score 69%. In the evaluation using the k-fold cross validation method with K = 10, the average accuracy for the KNN algorithm was 73% and for the Naïve Bayes algorithm was 70%. Thus, the KNN algorithm is superior and recommended for diabetes disease classification.

Authors

Publication Details

Journal
Journal of Artificial Intelligence and Software Engineering (J-AISE)
Published
2025-03-26
DOI
https://doi.org/10.30811/jaise.v5i1.6275
Primary Topic
Artificial Intelligence in Healthcare
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparison Of The Effectiveness Of K-Nearest Neighbor (KNN) And Naive Bayes Algorithms In Identifying Diabetes Patients

Bambang Ismanto, Eko Budi Susanto, Anin Naba Anzila
Journal of Artificial Intelligence and Software Engineering (J-AISE)
Artificial Intelligence in Healthcare
article

Comparison Of The Effectiveness Of K-Nearest Neighbor (KNN) And Naive Bayes Algorithms In Identifying Diabetes Patients

Bambang Ismanto, Eko Budi Susanto, Anin Naba Anzila
article en

Abstract

Delay in diagnosis of diabetes is one of the causes of increasing mortality due to complications before diagnosis is made. In the medical field, the application of machine learning models has opened up significant opportunities in improving the accuracy of early diagnosis of diabetes. This study aims to compare the performance of the K-Nearest Neighbors (KNN) and Naive Bayes Classifier (NBC) algorithms using a secondary dataset of 128 data records and containing 10 data variables relevant to the prediction of diabetes. The results of the analysis show that the KNN algorithm with parameters K = 21 based on the evaluation of the confusion matrix obtained an accuracy of 76.92%, recall 100%, precision 72% and F1-Score 84%. Meanwhile, the naïve Bayes algorithm obtained an accuracy of 65.63%, recall 52%, precision 100% and F1-Score 69%. In the evaluation using the k-fold cross validation method with K = 10, the average accuracy for the KNN algorithm was 73% and for the Naïve Bayes algorithm was 70%. Thus, the KNN algorithm is superior and recommended for diabetes disease classification.

Journal of Artificial Intelligence and Software Engineering (J-AISE)Vol. 5(1)
Openalex Percentile: Top 94%
Artificial Intelligence in Healthcare
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.