Sentiment Analysis of Marketplace Application Reviews Using Support Vector Machine (SVM) and K-Nearest Neighbors (KNN)
Abstract
Shopee is one of the most popular online marketplaces in Indonesia, with more than 103 million users in 2023. Most users consider factors such as customer reviews, ratings, prices, and free shipping promotions before making a purchase. Analyzing user reviews is essential to understand consumer perceptions of services, identify satisfaction or dissatisfaction, and detect potential issues that need to be addressed. However, sentiment analysis faces challenges in processing text with diverse language styles, structures, and informal expressions. To overcome these challenges, this study applies machine learning algorithms—Support Vector Machine (SVM) and K-Nearest Neighbors (KNN)—for classifying sentiment in Shopee user reviews. Data labeling using the Lexicon InSet method produced 9,509 positive reviews (47.55%), 7,686 negative reviews (38.43%), and 2,805 neutral reviews (14.03%). Based on the Confusion Matrix results, SVM outperformed KNN, particularly in classifying negative and neutral sentiments with higher accuracy. These findings indicate that SVM is a more effective and efficient model for sentiment analysis of user reviews on the Shopee platform.
Downloads
References
R. K. Halder, M. N. Uddin, M. A. Uddin, S. Aryal, and A. Khraisat, “Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications,” J. Big Data, 2024, doi: 10.1186/s40537-024-00973-y.
A. Muslikhun, “Analisis Faktor-Faktor yang Mempengaruhi Keputusan Pembelian Online di Marketplace Shopee Alfin Muslikhun semakin meningkat . Hasil survey dari ( Similarweb , 2023 ) menyatakan di tahun 2023 , pembelian online . Selain itu juga penelitian dari ( Oktaviana,” no. 4, 2024.
M. B. Sitepu, I. R. Munthe, and S. Z. Harahap, “Implementation of Support Vector Machine Algorithm for Shopee Customer Sentiment Anlysis,” Sinkron, vol. 7, no. 2, pp. 619–627, 2022, doi: 10.33395/sinkron.v7i2.11408.
N. Rezki, S. A. Thamrin, and S. Siswanto, “Sentiment Analysis of Merdeka Belajar Kampus Merdeka Policy Using Support Vector Machine With Word2Vec,” BAREKENG J. Ilmu Mat. dan Terap., vol. 17, no. 1, pp. 0481–0486, 2023, doi: 10.30598/barekengvol17iss1pp0481-0486.
A. A. Lutfi, A. E. Permanasari, and S. Fauziati, “Corrigendum: Sentiment Analysis in the Sales Review of Indonesian Marketplace by Utilizing Support Vector Machine,” J. Inf. Syst. Eng. Bus. Intell., vol. 4, no. 2, p. 169, 2018, doi: 10.20473/jisebi.4.2.169.
A. W. Sari, T. I. Hermanto, and M. Defriani, “Sentiment Analysis Of Tourist Reviews Using K-Nearest Neighbors Algorithm And Support Vector Machine,” Sinkron, vol. 8, no. 3, pp. 1366–1378, 2023, doi: 10.33395/sinkron.v8i3.12447.
S. Kübler, C. Liu, and Z. A. Sayyed, To use or not to use: Feature selection for sentiment analysis of highly imbalanced data, vol. 24, no. 1. 2018. doi: 10.1017/S1351324917000298.
Junadhi, Agustin, M. Rifqi, and M. K. Anam, “Sentiment Analysis of Online Lectures using K-Nearest Neighbors based on Feature Selection,” J. Nas. Pendidik. Tek. Inform., vol. 11, no. 3, pp. 216–225, 2022, doi: 10.23887/janapati.v11i3.51531.
Shahmirul Hafizullah Imanuddin, Kusworo Adi, and Rahmat Gernowo, “Sentiment Analysis on Satusehat Application Using Support Vector Machine Method,” J. Electron. Electromed. Eng. Med. Informatics, vol. 5, no. 3, pp. 143–149, 2023, doi: 10.35882/jeemi.v5i3.304.
Alqis Rausanfita, A. Ramadan, M. Dzulfikar Fauzi, Q. E. P. Mafidah, E. Ramona, and Y. Mahardika Putra, “Sentiment Analysis of Comments on Instagram Posts of Indonesia’s 2024 Presidential Candidates Using The Support Vector Machine Method,” Tech-E, vol. 7, no. 1, pp. 21–31, 2023, doi: 10.31253/te.v7i1.2289.
P. Cunningham and S. J. Delany, “K-nearest neighbour classifiers-a tutorial,” ACM Comput. Surv., 2021, doi: 10.1145/3459665.
M. Suyal and P. Goyal, “A review on analysis of k-nearest neighbor classification machine learning algorithms based on supervised learning,” … J. Eng. Trends …, 2022, [Online]. Available: https://www.researchgate.net/profile/Parul-Goyal-5/publication/362383623_A_Review_on_Analysis_of_K-Nearest_Neighbor_Classification_Machine_Learning_Algorithms_based_on_Supervised_Learning/links/65533e1cb1398a779d88c6a4/A-Review-on-Analysis-of-K-Nearest-Neighbor-Classification-Machine-Learning-Algorithms-based-on-Supervised-Learning.pdf
A. R. Lubis and M. Lubis, “Optimization of distance formula in K-Nearest Neighbor method,” Bull. Electr. Eng. …, 2020, [Online]. Available: https://mail.beei.org/index.php/EEI/article/view/1464
S. Kang, “k-Nearest Neighbor Learning with Graph Neural Networks,” Mathematics, 2021, [Online]. Available: https://www.mdpi.com/2227-7390/9/8/830
H. Henderi, T. Wahyuningsih, and E. Rahwanto, “Comparison of Min-Max normalization and Z-Score Normalization in the K-nearest neighbor (kNN) Algorithm to Test the Accuracy of Types of Breast Cancer,” … J. Informatics …, 2021, [Online]. Available: http://ijiis.org/index.php/IJIIS/article/view/73
Z. Pan, Y. Wang, and Y. Pan, “A new locally adaptive k-nearest neighbor algorithm based on discrimination class,” Knowledge-Based Syst., 2020, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0950705120304147
M. M. Kumbure, P. Luukka, and M. Collan, “A new fuzzy k-nearest neighbor classifier based on the Bonferroni mean,” Pattern Recognit. Lett., 2020, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0167865520303792
A. X. Wang, S. S. Chukova, and B. P. Nguyen, “Ensemble k-nearest neighbors based on centroid displacement,” Inf. Sci. (Ny)., 2023, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0020025523001731
M. Bansal, A. Goyal, and A. Choudhary, “A comparative analysis of K-nearest neighbor, genetic, support vector machine, decision tree, and long short term memory algorithms in machine learning,” Decis. Anal. J., 2022, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S2772662222000261
Z. Mushtaq, A. Yaqub, S. Sani, and ..., “Effective K-nearest neighbor classifications for Wisconsin breast cancer data sets,” J. Chinese …, 2020, doi: 10.1080/02533839.2019.1676658.
E. Y. Boateng, J. Otoo, and D. A. Abaye, “Basic tenets of classification algorithms K-nearest-neighbor, support vector machine, random forest and neural network: A review,” … Data Anal. …, 2020.
N. O. F. Daeli and A. Adiwijaya, “Sentiment analysis on movie reviews using Information gain and K-nearest neighbor,” J. Data Sci. Its Appl., 2020.
P. Cunningham and S. J. Delany, “k-Nearest neighbour classifiers: (with Python examples),” arXiv Prepr. arXiv2004.04523, 2020, [Online]. Available: https://arxiv.org/abs/2004.04523
Y. Tang, Y. Chang, and K. Li, “Applications of K-nearest neighbor algorithm in intelligent diagnosis of wind turbine blades damage,” Renew. Energy, 2023, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0960148123007164
M. Arunadevi, M. Rani, R. Sibinraj, M. K. Chandru, and ..., “Comparison of k-nearest neighbor & artificial neural network prediction in the mechanical properties of aluminum alloys,” Mater. Today …, 2023, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S221478532304782X
G. Lin, A. Lin, and D. Gu, “Using support vector regression and K-nearest neighbors for short-term traffic flow prediction based on maximal information coefficient,” Inf. Sci. (Ny)., 2022, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0020025522006843
Copyright (c) 2024 Arief Ichwani, Munawar, Rilla Gantino

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
This is an open-access article distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License which permits unrestricted use, distribution, and reproduction in any medium. Users are allowed to read, download, copy, distribute, search, or link to full-text articles in this journal without asking by giving appropriate credit, provide a link to the license, and indicate if changes were made. All of the remix, transform, or build upon the material must distribute the contributions under the same license as the original.












