Application Of Machine Learning K-Nearest Neighbour Algorithm To Predict Diabetes

  • Jack Billie Chandra Institut Bisnis dan Teknologi Pelita Indonesia, Pekanbaru, Indonesia
  • Dewi Nasien Institut Bisnis dan Teknologi Pelita Indonesia, Pekanbaru, Indonesia
Abstract viewed: 182 times
pdf downloaded: 120 times
Keywords: Diabetes, K-Nearest Neighbor, Prediction, Machine Learning


Diabetes is a chronic disease characterized by high blood sugar (glucose) levels or above abnormal values. This can occur when the body is no longer able to absorb glucose properly or when the intake of glucose is higher than needed. Glucose is the main energy source for the cells of the human body. Glucose that accumulates over the long term in the body can lead to complications and more serious and life-threatening diseases. As a result, patients with diabetes must be predicted prior to the onset of disease complications. Machine learning is one of the branches of artificial intelligence that can be used to provide predictive value to datasets of diabetic patients. The tested dataset has 390 observations with data on cholesterol levels, glucose, HDL cholesterol, cholesterol ratio, age, gender, blood pressure, BMI, waist and hip width with its ratio, and the patient's height and weight as variables. Predictions are applied using the K-Nearest Neighbor method, which shows an accuracy of 93.58% with a k value of 3, using 20% of all data as test data.


S. Kumar, “Detailed Analysis Of Classifiers For Prediction Of Diabetes,” Vol. 11, No. 09, pp. 209–212, 2022.

R. Saxena And S. Kumar Sharma Manali Gupta, “Role Of K-Nearest Neighbour In Detection Of Diabetes Mellitus,” Turkish J. Comput. Math. Educ., Vol. 12, No. 10, Pp. 373–376, 2021.

J. J. Pangaribuan, “Mendiagnosis Penyakit Diabetes Melitus Dengan Menggunakan Metode Extreme Learning Machine,” J. Isd, Vol. 2, No. 2, Pp. 69–76, 2016.

M. S. Mustafa And I. W. Simpen, “Implementasi Algoritma K-Nearest Neighbor (Knn) Untuk Memprediksi Pasien Terkena Penyakit Diabetes Pada Puskesmas Manyampa Kabupaten Bulukumba,” Semin. Ilm. Sist. Inf. Dan Teknol. Inf., Vol. Viii, No. 1, pp. 1–10, 2019.

P. C. Thirumal And N. Nagarajan, “Applying Average K Nearest Neighbour Algorithm To Detect Type-2 Diabetes,” Aust. J. Basic Appl. Sci., Vol. 8, No. 7, Pp. 128–134, 2014.

S. V. M And U. K, “Type 2 Diabetic Prediction Using Machine Learning Algorithm,” Am. Sci. Res. J. Eng. Technol. Sci., Vol. 45, No. 1, pp. 299–307, 2018.

M. Panda, D. P. Mishra, S. M. Patro, And S. R. Salkuti, “Prediction Of Diabetes Disease Using Machine Learning Algorithms,” Iaes Int. J. Artif. Intell., Vol. 11, No. 1, pp. 284–290, 2022.

M. Ula And A. Faridhatul Ulva, “Implementasi Machine Learning Dengan Model Case Based Reasoning Dalam Mendagnosa Gizi Buruk Pada Anak,” J. Inform. Kaputama, Vol. 5, No. 2, pp. 333–339, 2021.

Y. Mardi, “Data Mining : Klasifikasi Menggunakan Algoritma C4.5,” Edik Inform., Vol. 2, No. 2, Pp. 213–219, 2017.

R. R. Rerung, “Penerapan Data Mining Dengan Memanfaatkan Metode Association Rule Untuk Promosi Produk,” J. Teknol. Rekayasa, Vol. 3, No. 1, P. 89, 2018.

Yeni Kustiyahningsih And N. Syafa’ah, “Sistem Pendukung Keputusan Untuk Menentukan Jurusan Pada Siswa Sma Menggunakan Metode Knn Dan Smart,” J. Istek, Vol. Vi, No. 1, pp. 40–42, 2013.

M. F. Rahman, D. Alamsah, M. I. Darmawidjadja, And I. Nurma, “Klasifikasi Untuk Diagnosa Diabetes Menggunakan Metode Bayesian Regularization Neural Network (Rbnn),” J. Inform., Vol. 11, no. 1, p. 36, 2017.

B. P. Pratiwi And A. Silvia, “Pengukuran Kinerja Sistem Kualitas Udara Dengan Teknologi Wsn Menggunakan Confusion Matrix”, Vol. 6, No. 2, pp. 66–75, 2020.

How to Cite
Jack Billie Chandra and Dewi Nasien, “Application Of Machine Learning K-Nearest Neighbour Algorithm To Predict Diabetes”, IJEEPSE, vol. 6, no. 2, pp. 134-139, Jun. 2023.