Comparison of Performance of Four Distance Metric Algorithms in K-Nearest Neighbor Method on Diabetes Patient Data

  • Dewi Ratnasari Universitas Muslim Indonesia

Keywords: K-Nearest Neighbor, Akurasi, Presisi, Recall, F-measure, Penyakit Diabetes

Abstract

Diabetes is a chronic disease that occurs when the pancreas no longer produces insulin or when the body cannot effectively use the insulin it produces. The aim of this study is to analyze and compare the classification performance on diabetes patient dataset using four distance metric algorithms in the K-Nearest Neighbor (K-NN) method. Based on previous research, the performance values obtained were not sufficiently high, not exceeding 80%. Therefore, some actions are needed with the hope of obtaining new performance values and making comparisons with previous studies. Based on the test results using the confusion matrix, the accuracy level using Euclidean distance measurement obtained the best performance value at k=17 with 10-k fold, with an accuracy of 85.71%, precision of 86.24%, recall of 85.71%, and F-measure of 85.12%. The Manhattan distance measurement obtained the best performance value at k=25 with 10-k fold, with an accuracy of 85.53%, precision of 85.54%, recall of 85.53%, and F-measure of 85.10%. The Minkowski distance measurement obtained the best performance value at k=17 with 10-k fold, with an accuracy of 85.71%, precision of 86.24%, recall of 85.71%, and F-measure of 85.12%. On the other hand, the Hamming distance measurement obtained the best performance value at k=23 with 10-k fold, with an accuracy of 75.32%, precision of 79.27%, recall of 75.32%, and F-measure of 71.45%.

Downloads

Download data is not yet available.

References

[1] G. Mahalisa and N. Arminarahmah, “Diabetes Classification Analysis Using the Euclidean Distance Method Based on the K-Nearest Neighbors Algorithm,” J. Teknol. Komput. dan Sist. Inf., vol. 5, no. 3, pp. 178–182, 2022.
[2] K. F. Margolang, M. M. Siregar, S. Riyadi, and Z. Situmorang, “Analisa Distance Metric Algoritma K-Nearest Neighbor Pada Klasifikasi Kredit Macet,” J. Inf. Syst. Res., vol. 3, no. 2, pp. 118–124, 2022, doi: 10.47065/josh.v3i2.1262.
[3] J. Putra, Pengenalan Konsep Pembelajaran Mesin dan Deep Learning Edisi 1.3. Pengenalan Konsep Pembelajaran Mesin dan Deep Learning Edisi 1.3, 2019.
[4] Y. F. Affif Surya Diantika, “Implementasi Machine Learning Pada Aplikasi Penjualan Produk Digital (Studi Pada Grabkios),” no. 15.
[5] R. R. Rahayu and L. Lidiawati, “Implementasi Algoritma K-Nearest Neighbor Untuk Memprediksi Program Studi Bagi Calon Mahasiswa Baru,” Infotek J. Inform. dan Teknol., vol. 4, no. 2, pp. 131–141, 2021, doi: 10.29408/jit.v4i2.3546.
[6] N. Rosadi Adhim, “Analisis Performa Metode K-Nearest Neighbor (K-NN) Dalam Klasifikasi Data Pasien Penyakit Diabetes,” 2022.
[7] Bustami, “Penerapan Algoritma Naive Bayes,” J. Inform., vol. 8, no. 1, pp. 884–898, 2014.
[8] J. Eska, “Penerapan Data Mining Untuk Prekdiksi Penjualan Wallpaper Menggunakan Algoritma C4.5 STMIK Royal Ksiaran,” JURTEKSI (Jurnal Teknol. dan Sist. Informasi), vol. 2, pp. 9–13, 2016.
[9] Mardi Y, “Jurnal Edik Informatika Data Mining : Klasifikasi Menggunakan Algoritma C4 . 5 Data Mining Merupakan Bagian Dari Tahapan Proses Knowledge Discovery In Database ( Kdd ),” J. Edik Inform., p. 215, 2016.
[10] H. Azis, F. Tangguh Admojo, and E. Susanti, “Analisis Perbandingan Performa Metode Klasifikasi pada Dataset Multiclass Citra Busur Panah,” Techno.Com, vol. 19, no. 3, pp. 286–294, 2020, doi: 10.33633/tc.v19i3.3646.
[11] L. Nurhayati and H. Azis, “Perancangan Sistem Pendukung Keputusan untuk Proses Kenaikan Jabatan Struktural pada Biro Kepegawaian Setda Propinsi Maluku Utara,” Semnasteknomedia Online, pp. 6–7, 2015.
[12] D. Septiani, “Dan Naive Bayes Untuk Prediksi Penyakit Hepatitis,” J. Pilar Nusa Mandiri, vol. 13, no. 1, pp. 76–84, 2017.
[13] H. Leidiyana, “Penerapan Algoritma K-Nearest Neighbor Untuk Penentuan Resiko Kredit Kepemilikan Kendaraan Bermotor,” J. Penelit. Ilmu Komputer, Syst. Embed. Log., vol. 1, no. 1, pp. 65–76, 2013.
[14] Gavin Hackeling, Mastering Machine Learning with scikit-learn. 2014.
[15] M. M. Baharuddin, H. Azis, and T. Hasanuddin, “Analisis Performa Metode K-Nearest Neighbor Untuk Identifikasi Jenis Kaca,” Ilk. J. Ilm., vol. 11, no. 3, pp. 269–274, 2019, doi: 10.33096/ilkom.v11i3.489.269-274.
[16] Achmad Ridok, “Klasifikasi Dokumen Berbahasa Indonesia Menggunakan Metode K-NN,” J. Pointer, vol. 1, p. 44, 2019.
[17] N. L. Suryani, “Pengaruh Lingkungan Kerja Non Fisik Dan Komunikasi Terhadap Kinerja Karyawan Pada PT. Bangkit Maju Bersama Di Jakarta,” JENIUS (Jurnal Ilm. Manaj. Sumber Daya Manusia), vol. 2, no. 3, p. 419, 2019, doi: 10.32493/jjsdm.v2i3.3017.
Published
2023-07-31
How to Cite
Ratnasari, D. (2023). Comparison of Performance of Four Distance Metric Algorithms in K-Nearest Neighbor Method on Diabetes Patient Data. Indonesian Journal of Data and Science, 4(2), 97-108. https://doi.org/10.56705/ijodas.v4i2.71