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

Abstract


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.

Keywords


classification; data mining; diabetes mellitus; K-Nearest Neighbor; manhattan distance

Full Text:

PDF

References


H. Sun et al., “Erratum to ‘IDF Diabetes Atlas: Global, Regional and Country-Level Diabetes Prevalence Estimates for 2021 and Projections for 2045’ [Diabetes Res. Clin. Pract. 183 (2022) 109119],” Diabetes Research and Clinical Practice, Vol. 204, 2023.

Badan Pusat Statistik Kota Binjai, “Jumlah Kasus 10 Penyakit Terbanyak di Kota Binjai,” binjaikota.bps.go.id, 2024. [Online]. Available: https://binjaikota.bps.go.id/id/statistic-table/1/NzY1IzE=/jumlah-kasus-10-penyakit-terbanyak-di-kota-binjai-2024.html.

A. Aminuddin, Y. Sima, et al., “Edukasi Kesehatan tentang Penyakit Diabetes Mellitus bagi Masyarakat,” Abdimas Polsaka: Jurnal Pengabdian Kepada Masyarakat, Vol. 2, No. 1, 2023.

Nina, et al., “Determinan Risiko dan Pencegahan terhadap Kejadian Penyakit Diabetes Melitus Tipe 2 pada Usia Produktif di Wilayah DKI Jakarta,” Journal of Public Health Education, Vol. 2, No. 4, 2023.

American Diabetes Association Professional Practice Committee, “Diagnosis and Classification of Diabetes: Standards of Care in Diabetes–2024,” Diabetes Care, Vol. 47, Supplement_1, pp. S20–S42, 2024.

A. M. Argina, “Penerapan Metode Klasifikasi K-Nearest Neighbor pada Dataset Penderita Penyakit Diabetes,” Indonesian Journal of Data and Science, Vol. 1, No. 2, 2020.

H. A. D. Fasnuari, et al., “Penerapan Algoritma K-Nearest Neighbor (KNN) untuk Klasifikasi Penyakit Diabetes Melitus (Studi Kasus: Warga Desa Jati Tengah),” Antivirus: Jurnal Ilmiah Teknik Informatika, Vol. 16, No. 2, 2022.

A. D. J. Saputro, A. Darmawan, and B. N. Sari, “Klasifikasi Persentase Kemiskinan di Jawa Barat menggunakan Data Mining Algoritma K-Nearest Neighbor (KNN),” JATI (Jurnal Mahasiswa Teknik Informatika), Vol. 7, No. 1, 2023.

F. Pramonodjati, “Skrining Diabetes Melitus melalui Pemeriksaan Gula Darah Masyarakat Kota Surakarta pada Acara Car Free Day,” JIPMASLAB (Jurnal Inovasi dan Pemberdayaan Masyarakat Laboratorium Kesehatan), Vol. 1, No. 1, 2025.

M. H. Elison, R. Asrianto, and Aryanto, “Prediksi Penjualan Papan Bunga menggunakan Metode Double Exponential Smoothing,” JURSISTEKNI: Jurnal Riset Sistem Informasi dan Teknologi Informasi, Vol. 2, No. 3, 2020.

M. Dadang Iskandar and S. Nurhaliza, “Klasifikasi Jenis Kucing menggunakan Algoritma K-Nearest Neighbor,” JTIK: Jurnal Teknologi Informasi dan Komunikasi, Vol. 9, No. 3, 2025.

M. A. Kiram, E. Darnila, and I. Sahputra, “Machine Learning Klasifikasi Penyakit Jiwa menggunakan Metode K-Nearest Neighbor berbasis Web,” Jurnal Ners, Vol. 9, No. 2, 2025.

M. Graciela, Rikky, and H. Irsyad, “Klasifikasi Opini Masyarakat terhadap Naturalisasi Pemain Sepak Bola menggunakan KNN dan SMOTE,” in Proc. AICOMS, Vol. 3, No. 1, 2024.

I. Rosa and A. Ramadhanu, “Penerapan Algoritma K-Nearest Neighbor (KNN) dan PCA untuk Klasifikasi Apel Hijau, Apel Fuji dan Jeruk,” JATI (Jurnal Mahasiswa Teknik Informatika), Vol. 9, No. 2, 2025.

I. H. Kusuma and N. Cahyono, “Analisis Sentimen Masyarakat terhadap Penggunaan E-Commerce menggunakan Algoritma K-Nearest Neighbor,” JPIT: Jurnal Pengembangan IT, Vol. 8, No. 3, 2023.

P. Putra, A. M. H. Pardede, and S. Syahputra, “Analisis Metode K-Nearest Neighbor (KNN) dalam Klasifikasi Data Iris Bunga,” JTIK: Jurnal Teknik Informatika Kaputama, Vol. 6, No. 1, 2022.

Nunsina, Tulus, and Z. Situmorang, “Analysis Optimization K-Nearest Neighbor Algorithm with Certain Factor in Determining Student Career,” in Proc. MECnIT: Mechanical, Electronics, Computer and Industrial Technology, 2020.

M. Rahmadiah and P. Suparman, “Penerapan Metode K-Nearest Neighbor untuk Sistem Penentuan Peminjaman Modal Nasabah Bank Syariah Indonesia Cabang Cikarang berbasis Website,” JIK: Jurnal Informasi dan Komputer, Vol. 10, No. 2, 2022.

R. Rahmadini, et al., “Penerapan Data Mining untuk memprediksi Harga Bahan Pangan di Indonesia menggunakan Algoritma K-Nearest Neighbor,” JMAS: Jurnal Mahasiswa Akuntansi Samudra, Vol. 6, No. 4, 2023.

Undang-Undang Republik Indonesia Nomor 44 Tahun 2009 Tentang Rumah Sakit, 2009.




DOI: https://doi.org/10.32520/stmsi.v15i8.6835

Article Metrics

Abstract view : 0 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.