Analisis Perbandingan Kinerja Algoritma K-Nearest Neighbors dan Support Vector Machine untuk Klasifikasi Penyakit Diabetes
Keywords:
Accuracy, Diabetes, K-NN, SVM, ClassificationAbstract
Diabetes remains a significant global health challenge, with the number of cases increasing annually. Early detection is essential to prevent severe complications and reduce the burden on healthcare systems. However, traditional diagnostic methods often demand considerable time and resources. This study investigates the performance of two machine learning algorithms—K-Nearest Neighbors (K-NN) and Support Vector Machine (SVM)—in classifying diabetes using the Healthcare-Diabetes dataset. The models were evaluated based on accuracy, precision, recall, and F1-score. Experimental results indicate that the K-NN algorithm outperforms SVM, achieving an accuracy of 92.20% and an F1-score of 0.93. In comparison, the SVM algorithm attained an accuracy of 88.39% and an F1-score of 0.89. These findings suggest that the K-NN algorithm is more effective for diabetes classification in this dataset context.
Downloads
References
[1] Asri Mulyani, Sarah Khoerunisa, and Dede Kurniadi, “Perbandingan Kinerja Algoritma KNN dan SVM Menggunakan SMOTE untuk Klasifikasi Penyakit Diabetes,” Jurnal Nasional Teknik Elektro dan Teknologi Informasi, vol. 14, no. 1, pp. 25–34, Feb. 2025, doi: 10.22146/jnteti.v14i1.15198.
[2] N. Maulidah, R. Supriyadi, D. Y. Utami, F. N. Hasan, A. Fauzi, and A. Christian, “Prediksi Penyakit Diabetes Melitus Menggunakan Metode Support Vector Machine dan Naive Bayes,” Indonesian Journal on Software Engineering (IJSE), vol. 7, no. 1, pp. 63–68, 2021, doi: 10.31294/ijse.v7i1.10279.
[3] S. Arifin and R. Satria, “Pengembangan Algoritma Support Vector Machine (SVM) untuk Mengklasifikasi Penyakit Diabetes,” JIITE, Aug. 2024. doi: 10.63547/jiite.v1i2.39.
[4] D. Nasien et al., “Perbandingan Implementasi Machine Learning Menggunakan Metode KNN, Naive Bayes, Dan Logistik Regression Untuk Mengklasifikasi Penyakit Diabetes,” 2024. doi: 10.58794/jekin.v4i1.640.
[5] A. Wibowo, A. F. N. Masruriyah, and S. Rahmawati, “Refining Diabetes Diagnosis Models: The Impact of SMOTE on SVM, Logistic Regression, and Naïve Bayes for Imbalanced Datasets,” Journal of Electronics, Electromedical Engineering, and Medical Informatics, vol. 7, no. 1, pp. 197–207, Jan. 2025, doi: 10.35882/jeeemi.v7i1.596.
[6] M. Salem Alzboon, M. Alqaraleh, and M. Subhi Al-Batah, “Diabetes Prediction and Management Using Machine Learning Approaches,” Data and Metadata, vol. 4, Jan. 2025, doi: 10.56294/dm2025545.
[7] H. Tanveer, M. Faheem, A. H. Khan, and M. A. Adam, “Machine Learning Models for Personalized Treatment Recommendations in Diabetes Management,” International Journal of Scientific Research and Management (IJSRM), vol. 13, no. 04, pp. 2145–2154, Apr. 2025, doi: 10.18535/ijsrm/v13i04.ec03.
[8] F. Nur Ikhromr, I. Sugiyarto, U. Faddillah, and B. Sudarsono, “IMPLEMENTASI DATA MINING UNTUK MEMPREDIKSI PENYAKIT DIABETES MENGGUNAKAN ALGORITMA NAIVES BAYES DAN K-NEAREST NEIGHBOR,” Journal of Information Technology and Computer Science (INTECOMS), vol. 6, no. 1, 2023, doi: 10.31539/intecoms.v6i1.5916.
[9] M. Sholeh, D. Andayati, and Rr. Y. Rachmawati, “DATA MINING MODEL KLASIFIKASI MENGGUNAKAN ALGORITMA K-NEAREST NEIGHBOR DENGAN NORMALISASI UNTUK PREDIKSI PENYAKIT DIABETES,” TeIKa, vol. 12, no. 02, pp. 77–87, Oct. 2022, doi: 10.36342/teika.v12i02.2911.
[10] U. I. Lestari, “PENERAPAN METODE K-NEAREST NEIGHBOR UNTUK SISTEM PENDUKUNG KEPUTUSAN IDENTIFIKASI PENYAKIT DIABETES MELITUS,” JATISI (Jurnal Teknik Informatika dan Sistem Informasi), vol. 8, no. 4, pp. 2071–2082, Dec. 2021, doi: 10.35957/jatisi.v8i4.1235.
[11] Hidayatunnisa’i, Kusrini, and Kusnawi, “PERBANDINGAN KINERJA METODE NAÏVE BAYES DAN SUPPORT MACHINE (SVM) DALAM ANALISIS KUALITAS BUTIR SOAL PILIHAN GANDA,” JURNAL FASILKOM, vol. 13, no. 02, pp. 173–180, Aug. 2023, doi: 10.37859/jf.v13i02.5087.
[12] M. Vamsikrishna et al., “An ensemble approach for detection of diabetes using SVM and DT,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 38, no. 1, p. 689, Apr. 2025, doi: 10.11591/ijeecs.v38.i1.pp689-698.
[13] A. A. Abdillah, A. Azwardi, I. Wahyudi, S. Arifin, M. A. Ibrahim, and T. Mauritsus, “LDA and SVM performance evaluation for diabetes prediction,” in AIP Conference Proceedings, American Institute of Physics, Apr. 2024. doi: 10.1063/5.0198841.
[14] S. Yang, “Diabetes Prediction Based on KNN, XGBoost, SVM and LR model,” Applied and Computational Engineering, vol. 104, no. 1, pp. 91–95, Nov. 2024, doi: 10.54254/2755-2721/104/20241142.
[15] F. R. Lumbanraja, F. Lufiana, Y. Heningtyas, and K. Muludi, “IMPLEMENTASI SUPPORT VECTOR MACHINE (SVM) UNTUK KLASIFIKASI PEDERITA DIABETES MELLITUS,” Jurnal Komputasi, vol. 10, no. 1, pp. 75–83, Apr. 2022, doi: 10.23960/komputasi.v10i1.2940.
[16] Fibia Sentauri Cahyaningrum, “Comparison of Binary Logistic Regression and SVM to Classify Diabetes Sufferers,” Journal of Intelligent Systems and Information Technology, vol. 1, no. 2, pp. 74–84, Jul. 2024, doi: 10.61971/jisit.v1i2.76.
[17] A. Pinandito, S. A. Wicaksono, and S. H. Wijoyo, “Implementasi Machine Learning dalam Deteksi Risiko Tinggi Diabetes Melitus pada Kehamilan,” Jurnal Teknologi Informasi dan Ilmu Komputer, vol. 10, no. 4, pp. 739–746, Aug. 2023, doi: 10.25126/jtiik.20241047005.
[18] A. Farhan AlShammari, “Implementation of Model Evaluation using Confusion Matrix in Python,” 2024. doi: 10.5120/ijca2024924236.
[19] S. Sathyanarayanan, “Confusion Matrix-Based Performance Evaluation Metrics,” African Journal of Biomedical Research, pp. 4023–4031, Nov. 2024, doi: 10.53555/AJBR.v27i4S.4345.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Hidayat Hatta Irsyad, Muhammad Ikran Syafwan, dian ramadhani (Author)

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