Severity Classification of Diabetes Mellitus Patients at the Puskesmas Pembantu of Binjai City using the K-Nearest Neighbor (KNN) Algorithm - Nadya Putri Dwinta; Asrianda Asrianda; Rini Meiyanti (Universitas Islam Indragiri, 2026)
Diabetes mellitus (DM) is a chronic disease with an increasing prevalence, including in Binjai City. Manually determining the severity level of DM patients requires a high degree of accuracy and careful assessment because it involves multiple medical indicators. Therefore, a classification method is needed to assist healthcare professionals in making faster and more accurate assessments. This study aims to develop a classification system for determining the severity of Type 1 and Type 2 diabetes mellitus in patients at Puskesmas Pembantu in Binjai City using the K-Nearest Neighbors (KNN) algorithm and to evaluate its classification performance. The dataset consisted of 594 patient medical records collected from 2024–2025, comprising 13 attributes, including age, height, weight, body mass index, waist circumference, systolic blood pressure, diastolic blood pressure, blood glucose level, and encoded attributes. The data preprocessing stage involved transforming categorical attributes and applying Z-score normalization before calculating similarity using the Manhattan distance metric. The model was evaluated using values of k ranging from 1 to 15 to determine the optimal k. The results show that k = 1 achieved the highest accuracy of 98.86%, with a precision of 97.71%, recall of 100%, and an F1-score of 0.99. The KNN algorithm was subsequently implemented in a web-based system that enables healthcare professionals to enter patient data and obtain classification results directly. These findings demonstrate that the KNN algorithm using the Manhattan distance metric is effective for classifying DM severity levels and can serve as a decision-support tool for healthcare professionals at Puskesmas Pembantu in Binjai City.