Jurnal Algoritma
Vol 22 No 2 (2025): Jurnal Algoritma

Penerapan Algoritma K-Nearest Neighbor untuk Analisis Sentimen Ulasan Produk Elektronik pada Platform E-Commerce

Octavia, Noer Fotin (Unknown)
Berlilana (Unknown)



Article Info

Publish Date
30 Nov 2025

Abstract

The study aims to evaluate user sentiment toward Samsung products on the Tokopedia e-commerce platform using the K-Nearest Neighbor (KNN) algorithm. E-commerce plays a crucial role in modern trade, where consumer reviews provide insights into their level of satisfaction. The KNN method is applied to classify reviews into positive, negative, and neutral sentiment categories based on the collected review data. The research procedure includes collecting 2,200 Samsung product reviews from Tokopedia, followed by preprocessing steps such as tokenization, normalization, stopword removal, stemming, and data cleaning. The data is then weighted using TF-IDF before being classified with KNN. The results show that the KNN model achieved the highest accuracy of 91.35 percent at K=3, while K=5 yielded 90.38 percent and K=7 reached 90.14 percent. The model performed exceptionally well in detecting positive sentiment, with 100 percent precision and recall and an F1-score of 96 percent, although its performance was less optimal for negative and neutral sentiments. Overall, KNN proved effective in analyzing sentiment in Tokopedia product reviews, demonstrating higher accuracy than other methods used in previous studies and showing the capability to capture local patterns within a single-brand dataset. Nevertheless, further methodological improvements and enhanced data processing are needed to achieve more precise and balanced performance across all sentiment categories.

Copyrights © 2025






Journal Info

Abbrev

algoritma

Publisher

Subject

Computer Science & IT

Description

Jurnal Algoritma merupakan jurnal yang digunakan untuk mempublikasikan hasil penelitian dalam bidang Teknologi Informasi (TI), Sistem Informasi (SI), dan Rekayasa Perangkat Lunak (RPL), Multimedia (MM), dan Ilmu Komputer (Computer ...