Improving the Performance of the K-Nearest Neighbors (KNN) Algorithm by Optimizing the K Value Using Particle Swarm Optimization on Madura Batik Review Data
DOI:
https://doi.org/10.26555/jiteki.v11i2.30775Abstract
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.
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Ach. Dafid Dafid, Achmad Imam Sudianto, Ribka Sitepu Debora

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with JITEKI agree to the following terms:
- Authors retain copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC BY-SA 4.0) that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.
This work is licensed under a Creative Commons Attribution 4.0 International License