Improving the Performance of the K-Nearest Neighbors (KNN) Algorithm by Optimizing the K Value Using Particle Swarm Optimization on Madura Batik Review Data

Authors

  • Ach. Dafid Dafid Universitas Trunojoyo Madura
  • Achmad Imam Sudianto Universitas Trunojoyo Madura
  • Ribka Sitepu Debora Universitas Trunojoyo Madura

DOI:

https://doi.org/10.26555/jiteki.v11i2.30775

Abstract

This study aims to improve the performance of the K-Nearest Neighbors (KNN) algorithm in classifying public reviews of Batik Madura through optimizing the K value using the Particle Swarm Optimization (PSO) algorithm. Public reviews collected from the Google Maps platform are used as a dataset, with positive, negative, and neutral sentiment categories. Optimization of the K value is carried out to overcome the constraints of KNN performance which is highly dependent on the K parameter, with PSO providing a more efficient approach than the grid search method. This study has succeeded in developing a web-based system using the Python Streamlit framework, which makes it easy for users to access sentiment analysis results. Testing shows that optimizing the K value with PSO increases the accuracy of KNN to 88.5% with an optimal K value of 19, making it an effective solution for sentiment analysis of public reviews. The results of this system are expected to help Batik Madura entrepreneurs in evaluating public perception and carrying out strategic innovations that are more in line with market needs. Research outputs include journal publications, intellectual property rights (IPR), and a prototype of a web-based system, with the potential for sustainability through the development of a deep learning model for more complex sentiment classification.

Author Biographies

Achmad Imam Sudianto, Universitas Trunojoyo Madura

Department of Mechatronics Engineering, Jl. Raya Telang PO BOX 2 Kamal, Bangkalan 69162, Indonesia

Ribka Sitepu Debora , Universitas Trunojoyo Madura

Department of Information System, Jl. Raya Telang PO BOX 2 Kamal, Bangkalan 69162, Indonesia

Published

2025-05-04

How to Cite

[1]
A. D. Dafid, A. I. Sudianto, and R. Sitepu Debora, “Improving the Performance of the K-Nearest Neighbors (KNN) Algorithm by Optimizing the K Value Using Particle Swarm Optimization on Madura Batik Review Data”, J. Ilm. Tek. Elektro Komput. Dan Inform, vol. 11, no. 2, May 2025.

Issue

Section

Articles