Jurnal Teknologi Rekayasa Informasi dan Komputer
Vol 9, No 1 (2026): JURNAL TRIK - POLITEKNIK NEGERI LHOKSEUMAWE

Application of the K-Nearest Neighbors (KNN) Algorithm for Diabetes Mellitus Classification: Evidence from Aceh Province, Indonesia

Aulia Safira Rahman, Cut (Unknown)
Aulia, Rizky Wahyu (Unknown)
Azhar, Azhar (Unknown)
Hidayat, Rahmad (Unknown)



Article Info

Publish Date
20 Feb 2026

Abstract

Diabetes mellitus is a non-communicable disease with a steadily increasing prevalence in Indonesia, including Aceh Province. Early detection using data-driven approaches is essential to minimize the risk of severe complications. This study aims to classify diabetes mellitus by implementing the K-Nearest Neighbors (KNN) algorithm. The dataset comprises 1,500 instances from the Pima Indians Diabetes Dataset obtained from Kaggle and an additional 100 instances collected from hospitals across Aceh Province. Data preprocessing involved normalization and label encoding, followed by data partitioning into training and testing sets using a 90:10 ratio. The KNN model was configured with a parameter value of K=5. Experimental results indicate that the proposed model achieved an accuracy of 85%, precision of 87%, recall of 82%, and an F1-score of 85% on the Kaggle dataset. For the hospital dataset, the model attained an accuracy of 76%, precision of 80.95%, recall of 68%, and an F1-score of 73.91%. These findings suggest that the KNN algorithm demonstrates adequate performance in classifying diabetes mellitus and may serve as a basis for the development of data-driven medical decision support systems.

Copyrights © 2026






Journal Info

Abbrev

TRIK

Publisher

Subject

Computer Science & IT

Description

Jurnal Teknologi Rekayasa Informasi dan Komputer (JTRIK) merupakan media publikasi hasil penelitian yang diterbitkan oleh Politeknik Negeri Lhokseumawe. JTRIK dipublikasikan setiap 2 bulan yaitu maret dan september baik secara print dan online. Scope jurnal ini meliputi bidang ilmu komputer, ...