Comparison of K-Nearest Neighbor (KNN) and Support Vector Machine (SVM) Algorithms in Predicting Customer Satisfaction
DOI:
https://doi.org/10.55537/cosie.v4i3.1160Abstract
This study compares the K-Nearest Neighbor (KNN) and Support Vector Machine (SVM) algorithms in predicting customer satisfaction at Warung Makan Indomie (Warmindo). The research process consists of four stages, namely: data collection, data processing, model formation, and model evaluation. This study aims to compare the performance of two classification algorithms, namely K-Nearest Neighbor (KNN) and Support Vector Machine (SVM), in predicting customer satisfaction levels based on survey data. The evaluation was carried out using accuracy metrics and classification reports to determine the level of precision, recall, and f1-score of each algorithm. The evaluation results show that both algorithms have the same accuracy of 70%. KNN excels in f1-score in class 2 (0.70), while SVM excels in precision in class 2 (0.79). with an average score of both algorithms being 0.61. These results indicate that both KNN and SVM are feasible to use, depending on the performance priority per class
Downloads
References
[1] Y. Maulina, A. Gunaryati, and R. T. Aldisa, “Sistem Pakar Diagnosis Awal Penyakit
Anemia Menggunakan Metode Naïve Bayes dan Certainty Factor,” STRING (Satuan Tulisan Ris. dan Inov. Teknol., vol. 8, no. 1, p. 110, 2023, doi:10.30998/string.v8i1.16468.
[2] I. H. Pratama and U. Salamah, “Perbandingan Algoritma K-Nearest Neighbor Dan Support Vector Machine Untuk Menentukan Prediksi Produk-Produk Terlaris Pada Toko Madura Kecamatan Pondok Aren,” J. Tek. Inform. Kaputama, vol. 6, no. 2, pp. 846–858, 2022, [Online]. Available: https://jurnal-backup.kaputama.ac.id/index.php/JTIK/article/view/1163
[3] A. M. W. S. A and Z. Fatah, “Prediksi Produk Penjualan Di Supermarket Dengan Metode Algoritma K-Nearest Neighbors ( KNN ),” vol. 3, no. 1, 2025.
[4] I. W. A. Purnawibawa, I. N. Purnama, and I. N. Y. A. Wijaya, “Komparasi Algoritme K-Nearest Neighbors Dan Support Vector Machines Dalam Prediksi Layanan Produk ICONNET,” Progresif J. Ilm. Komput., vol. 18, no. 2, p. 271, 2022, doi: 10.35889/progresif.v18i2.894.
[5] “Kaggle: Your Machine Learning and Data Science Community,” Kaggle.com, 2025. https://www.kaggle.com/ (accessed Jun. 03, 2025).
[6] Syahril Dwi Prasetyo, Shofa Shofiah Hilabi, and Fitri Nurapriani, “Analisis Sentimen Relokasi Ibukota Nusantara Menggunakan Algoritma Naïve Bayes dan KNN,” J. KomtekInfo, vol. 10, pp. 1–7, 2023, doi: 10.35134/komtekinfo.v10i1.330.
[7] J. Muliawan and E. Dazki, “Sentiment Analysis of Indonesia’S Capital City Relocation Using Three Algorithms: Naïve Bayes, Knn, and Random Forest,” J. Tek. Inform., vol. 4, no. 5, pp. 1227–1236, 2023, doi: 10.52436/1.jutif.2023.4.5.1436.
[8] W. A. Ridho, T. Wuryandari, and A. R. Hakim, “Perbandingan Kinerja Metode Klasifikasi K-Nearest Neighbor Dan Support Vector Machines Pada Dataset Parkinson,” J. Gaussian, vol. 12, no. 3, pp. 372–381, 2024, doi: 10.14710/j.gauss.12.3.372-381.
[9] W. A. Ridho, T. Wuryandari, and A. R. Hakim, “Perbandingan Kinerja Metode Klasifikasi K-Nearest Neighbor Dan Support Vector Machines Pada Dataset Parkinson,” J. Gaussian, vol. 12, no. 3, pp. 372–381, 2024, doi: 10.14710/j.gauss.12.3.372-381.
[10] M. Utami and V. Ayumi, “Prediksi Penjualan Produk Terlaris Menggunakan Algoritma K-Nearest Neighboard ( KNN ),” pp. 43–47, 2024.
[11] G. Rahmawati, S. A. Sanmas, E. Nudyawati, and N. D. Syaharani, “Studi Perbandingan Performa : Prediksi Status Stunting Pada Anak Berdasarkan Data Antropometri Menggunakan Algoritma Support Vector Machine ( SVM ) dan K-Nearest Neighbors ( KNN ),” vol. 2024, no. Senada, pp. 782–790, 2024.
[12] S. A. Lashari, M. M. Khan, A. Khan, and S. Salahuddin, “Comparative Evaluation of Machine Learning Models for Mobile Phone Price Prediction : Assessing Accuracy , Robustness , and Generalization Performance,” vol. 3, no. 3, 2024.
[13] M. Dava, R. Fajar, D. Puspitasari, and Q. N. Azizah, “K-Nearest Neighbor and Naive Bayes Algorithm Approach for Online Sales Level Classification Optimization In South Tangerang,” vol. 12, no. 3, pp. 663–668, 2024.
[14] F. Pritama, E. Rueh, D. Leluni, and J. Parhusip, “Analisis Distribusi Kinerja SVM dan KNN Berdasarkan Rata Rata Simpangan Baku dan Stabilitas Analysis of SVM and KNN Performance Distribution Based on Average Standard Deviation and Stability,” vol. 1, 2024.
[15] M. Muchtar and R. A. Muchtar, “Perbandingan Metode Knn Dan Svm Dalam Klasifikasi Kematangan Buah Mangga Berdasarkan Citra Hsv Dan Fitur Statistik,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 2, pp. 876–884, 2024, doi: 10.23960/jitet.v12i2.4010.
[16] M. Fadawkas Oemarki, M. Dimas Mufti Baskara, and I. Ernawati, “Perbandingan Akurasi Metode Support Vector Machine Dan K-Nearest Neighbour Dalam Prediksi Curah Hujan Potensi Banjir,” no. April, pp. 160–167, 2024, [Online]. Available: https://dataonline.bmkg.go.id/home.
[17] A. Sharma, M. Dutta, and R. Prakash, “Comparative Performance Analysis of Machine Learning Algorithms for COVID-19 Cases in India,” Commun. Comput. Inf. Sci., vol. 1929, no. 11, pp. 243–257, 2024, doi: 10.1007/978-3-031-48774-3_17.
[18] A. Putri et al., “Komparasi Algoritma K-NN, Naive Bayes dan SVM untuk Prediksi Kelulusan Mahasiswa Tingkat Akhir,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 3, no. 1, pp. 20–26, 2023, doi: 10.57152/malcom.v3i1.610.
[19] Amanda Pratiwi, Ananto Tri Sasongko, and D. K. Pramudito, “Analisis Prediksi Gilingan Plastik Terlaris Menggunakan Algoritma K-Nearest Neighbor Di Cv Menembus Batas,” J. Inform. Teknol. dan Sains, vol. 5, no. 3, pp. 437–445, 2023, doi: 10.51401/jinteks.v5i3.3323.
[20] V. Sariayu and P. Sugiartawan, “Analisis Prediksi Penjualan Lampu Dengan Metode Svm Pada PT. Terang Abadi Raya,” J. Sist. Inf. dan Komput. Terap. Indones., vol. 5, no. 1, pp. 1–10, 2022, doi: 10.33173/jsikti.172.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Subhan Rizky Pratama, Ika Nur Fajri

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