Evaluasi Komparatif Algoritma Naïve Bayes, KNN, Logistic Regression, SVM, dan Extra Trees untuk Analisis Sentimen Tokopedia


  • Indramawan Ciputra * Mail Universitas Dian Nuswantoro, Semarang, Indonesia
  • Amiq Fahmi Universitas Dian Nuswantoro, Semarang, Indonesia
  • (*) Corresponding Author
Keywords: Sentiment Analysis; Text Classification; E-Commerce; Machine Learning; Extra Trees Classifier

Abstract

The rapid evolution of digital technology has catalyzed a shift in consumer behavior, particularly in online shopping activities facilitated by e-commerce platforms such as Tokopedia. User-generated reviews yield large-scale textual data that can be systematically analyzed to uncover consumer sentiment in a factual and structured manner. This study aims to evaluate and compare the performance of five sentiment classification algorithms Naive Bayes, K-Nearest Neighbors (KNN), Logistic Regression, Support Vector Machine (SVM), and Extra Trees Classifier based on user review data from Tokopedia. The analytical workflow begins with web crawling, followed by text preprocessing procedures including tokenization, case folding, and stop-word removal, culminating in sentiment classification using the aforementioned algorithms. Performance evaluation was conducted using four standard metrics accuracy, precision, recall, and F1-score. The results reveal that SVM achieved the highest accuracy at 85%, outperforming KNN and Extra Trees Classifier (84%), Logistic Regression (82%), and Naive Bayes (79%). SVM’s superior performance is attributed to its ability to identify optimal hyperplanes that effectively separate sentiment classes, particularly in high-dimensional feature spaces. These findings offer practical insights for developers of sentiment analysis systems in selecting the most effective algorithm, while reinforcing the strategic application of Natural Language Processing (NLP) techniques within Indonesia’s e-commerce landscape.

Downloads

Download data is not yet available.

References

A. Simanungkalit, J. P. P. Naibaho, and A. De Kweldju, “Analisis Sentimen Berbasis Aspek Pada Ulasan Aplikasi Shopee Menggunakan Algoritma Naïve Bayes” Jurnal Teknologi Informasi dan Ilmu Komputer (JTIIK), vol. 10, no. 3, pp. 659-670, Mar. 2023. doi: 10.35889/jutisi.v13i1.1826.

A. Wardhana, M. Pradana, H. Shabira, D. M. A. Buana, D. W. Nugraha, and K. S. Sandi, “The Influence of Consumer Behavior on Purchasing Decision Process of Tokopedia E-Commerce Customers in Indonesia,” Proceedings of the 11th Annual International Conference on Industrial Engineering and Operations Management (IEOM), vol. 11 no. 1, pp. 5929–5934, Mar. 2021, doi: 10.46254/an11.20210998.

N. M. Al Ghazali and Y. Sibaroni, “Sentiment Classification in E-Commerce Using Naïve Bayes and Combined Lexicon - N-Gram Features,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 10, no. 2, pp. 1257–1271, Mar. 2025, doi: 10.29100/jipi.v10i2.6157.

A. Ernawati, A. Ofta Sari, S. Nurhaliza Sofyan, M. Iqbal, and R. Farta Wijaya, “Implementasi Algoritma Naïve Bayes dalam Menganalisis Sentimen Review Pengguna Tokopedia pada Produk Kesehatan,” Bulletin of Information Technology (BIT), vol. 4, no. 4, pp. 533–543, Dec. 2023, doi: 10.47065/bit.v3i1.1090.

C. Cahyaningtyas, Y. Nataliani, and I. R. Widiasari, “Analisis sentimen pada rating aplikasi Shopee menggunakan metode Decision Tree berbasis SMOTE,” AITI: Jurnal Teknologi Informasi, vol. 18, no. Agustus, pp. 173–184, 2021, doi: 10.24246/aiti.v18i2.173-184.

D. Pratmanto, R. Wijianto, A. Widayanto, and Ubaidilah, “Komparasi K-Nearest Neighbors (KNN) dan Naïve Bayes pada Klasifikasi Sentimen Ulasan Aplikasi Tokopedia di Google Play Store,” Informatics and Computer Engineering Journal, vol. 5, no. 2, pp. 75–86, Aug. 2025, doi: 10.31294/icej.v5i2.8939.

M. J. Setiawan and V. R. S. Nastiti, “DANA App Sentiment Analysis: Comparison of XGBoost, SVM, and Extra Trees,” Jurnal Sisfokom (Sistem Informasi dan Komputer), vol. 13, no. 3, pp. 337–345, Nov. 2024, doi: 10.32736/sisfokom.v13i3.2239.

J. Saputra, L. Maryani, R. Rahmaddeni, D. Wulandari, and W. Eka, “Analisis Performa Naive Bayes dan SVM terhadap Sentimen Teks Media Sosial dengan Word2Vec dan SMOTE,” INTEK: Jurnal Informatika dan Komputer, vol. 10, no. 1, pp. 143–155, Apr. 2025, doi: 10.24252/instek.v10i1.54889.

E. Hasibuan and E. A. Heriyanto “Analisis Sentimen pada Ulasan Aplikasi Amazon Shopping di Google Play Store Menggunakan Naive Bayes Classifier,” Jurnal Teknologi dan Sistem (JTS), vol. 1, no. 3, pp. 13–24, Oct. 2022, doi: 10.56127/jts.v1i3.434.

H. Aprilianti, H. Mustofa, K. Umam, and M. R. Handayani, “Comparative Study of SVM, KNN, and Naïve Bayes for Sentiment Analysis of Religious Application Reviews” Journal of Applied Informatics and Computing (JAIC), vol. 9, no. 3, pp. 920–927, Jun. 2025, doi: 10.30871/jaic.v9i3.9482

P. A. Prastyo, Berlilana, and I. Tahyudin, “Sentiment Analysis on Slang Enriched Texts Using Machine Learning Approaches,” Journal of Applied Data Sciences, vol. 6, no. 2, pp. 1076–1087, May 2025, doi: 10.47738/jads.v6i2.626.

P. Assiroj, A. Kurnia, and S. Alam, “The performance of Naïve Bayes, support vector machine, and logistic regression on Indonesia immigration sentiment analysis,” Bulletin of Electrical Engineering and Informatics, vol. 12, no. 6, pp. 3843–3852, Dec. 2023, doi: 10.11591/eei.v12i6.5688.

S. Riyanto, I. S. Sitanggang, T. Djatna, and T. D. Atikah, “Comparative Analysis using Various Performance Metrics in Imbalanced Data for Multi-class Text Classification.” International Journal of Advanced Computer Science and Applications (IJACSA), vol. 14, no. 6, pp. 1081–1090, Jun. 2023, doi: 10.14569/ijacsa.2023.01406116.

Z. Xiao, L. Wang, and J. Y. Du, “Improving the performance of sentiment classification on imbalanced datasets with transfer learning,” IEEE Access, vol. 7, pp. 28281–28290, Jan. 2019, doi: 10.1109/ACCESS.2019.2892094.

E. Wibowo and I. Pratama, “Analisis Sentimen Terhadap Ulasan Hotel Melalui Platform Google Review Menggunakan Metode Stacking,” Jurnal Teknologi Dan Sistem Informasi Bisnis (JTEKSIS), vol. 6, no. 4, pp. 774–784, Oct. 2024, doi: 10.47233/jteksis.v6i4.1475.

N. C. Agustina, D. Herlina Citra, W. Purnama, C. Nisa, and A. Rozi Kurnia, “The Implementation of Naïve Bayes Algorithm for Sentiment Analysis of Shopee Reviews on Google Play Store,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 2, no. 1, pp. 47–54, 2022, doi: 10.57152/malcom.v2i1.195.

S. Khairunnisa, A. Adiwijaya, and S. Al Faraby, “Pengaruh Text Preprocessing terhadap Analisis Sentimen Komentar Masyarakat pada Media Sosial Twitter (Studi Kasus Pandemi COVID-19),” Jurnal Media Informatika Budidarma, vol. 5, no. 2, p. 406-414, 2021, doi: 10.30865/mib.v5i2.2835.

N. S. Ramadan, D. Darwis, “Perbandingan Metode Naïve Bayes dan SVM untuk Sentimen Analisis Masyarakat terhadap Serangan Ransomware pada Data KIP-K,” Jurnal Sistem Informasi dan Informatika (Simika), vol. 8, no. 1, pp. 12–23, 2025, doi: 10.47080/simika.v8i1.3621.

M. F. As Shidiq and D. Alita, “Analisis Sentimen Masyarakat Terhadap Kasus Judi Online Menggunakan Data Dari Media Sosial X Pendekatan Naive Bayes Dan Svm,” Jurnal Sistem Informasi dan Informatika (Simika), vol. 8, no. 1, pp. 24–35, 2025, doi: 10.47080/simika.v8i1.3624.

N. A. Ramdhania, A. C. Siregar, and Sucipto, “Analisis sentimen pengguna X terhadap Istana Garuda IKN menggunakan algoritma Naïve Bayes,” Jurnal Pendidikan Informatika dan Sains, vol. 14, no. 1, pp. 36–53, Jun. 2025, doi: 10.31571/saintek.v14i1.8735.

D. N. Agustia dan R. R. Suryono, “Comparison of Naïve Bayes, Random Forest, and Logistic Regression Algorithms for Sentiment Analysis Online Gambling,” Jurnal Inovtek Polbeng – Seri Informatika, vol. 10, no. 1, pp. 284–295, Mar. 2025, doi: 10.35314/prk93630.

Sudriyanto, F. Syahro, and N. Fitriani, “Perbandingan Performa Model Machine Learning Support Vector Machine, Neural Network, dan K-Nearest Neighbors dalam Prediksi Harga Saham,” Jar’s: Jurnal Advance Research – Informatika dan Sistem Informasi, vol. 2, no. 1, pp. 13–21, Dec. 2023, doi: 10.24929/jars.v2i1.2983.

F. Fazrin, O. N. Pratiwi, and R. Andreswari, “Perbandingan Algoritma K-Nearest Neighbor dan Logistic Regression pada Analisis Sentimen terhadap Vaksinasi Covid-19 pada Media Sosial Twitter dengan Pelabelan Vader dan Textblob,” Journal e-Proceeding of Engineering, vol. 10, no. 2, pp. 1596–1604, Apr. 2023, doi: 10.1109/icsintesa56431.2022.10041609.

D. Al Mahkya, K. A. Notodiputro, and B. Sartono, “Extra Trees Method for Stock Price Forecasting with Rolling Origin Accuracy Evaluation,” MEDIA STATISTIKA, vol. 15, no. 1, pp. 36–47, Jul. 2022, doi: 10.14710/medstat.15.1.36-47.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Evaluasi Komparatif Algoritma Naïve Bayes, KNN, Logistic Regression, SVM, dan Extra Trees untuk Analisis Sentimen Tokopedia

Dimensions Badge
Article History
Submitted: 2025-10-15
Published: 2025-12-08
Abstract View: 63 times
PDF Download: 46 times
How to Cite
Ciputra, I., & Fahmi, A. (2025). Evaluasi Komparatif Algoritma Naïve Bayes, KNN, Logistic Regression, SVM, dan Extra Trees untuk Analisis Sentimen Tokopedia. Building of Informatics, Technology and Science (BITS), 7(3), 1464-1478. https://doi.org/10.47065/bits.v7i3.8537
Issue
Section
Articles