Penerapan Algoritma Random Forest Berbasis TF – IDF untuk Meningkatkan untuk Akurasi Deteksi Sentimen Ulasan Produk E-Commerce
DOI:
https://doi.org/10.30606/rjti.v4i3.4045Keywords:
: Sentiment Analysis, E-Commerce, Random Forest, Product Reviews, TF-IDFAbstract
Pertumbuhan pesat e-commerce menghasilkan volume ulasan pelanggan yang sangat besar dan tidak terstruktur, sehingga analisis manual menjadi tidak efisien. Penelitian ini bertujuan menerapkan algoritma Random Forest berbasis TF-IDF untuk meningkatkan akurasi deteksi sentimen ulasan produk e-commerce secara otomatis. Dataset yang digunakan merupakan Amazon Product Reviews dengan total 20.000 data yang dipilih secara stratified, terdiri dari dua kelas sentimen utama yaitu positif dan negatif. Permasalahan utama yang dihadapi adalah ketidakseimbangan data, di mana ulasan positif jauh lebih dominan sehingga menurunkan kemampuan model dalam mengenali ulasan negatif. Untuk mengatasi hal tersebut, penelitian ini menerapkan tahapan preprocessing, ekstraksi fitur TF-IDF, penyeimbangan data menggunakan SMOTE, serta optimasi model melalui hyperparameter tuning dan Stratified Cross Validation. Hasil percobaan menunjukkan bahwa model awal (tanpa SMOTE dan tuning) hanya mampu mencapai recall kelas negatif sebesar 0,20, meskipun akurasinya relatif tinggi. Setelah penerapan SMOTE dan optimasi parameter, performa model meningkat secara signifikan dengan akurasi 86,87% dan recall kelas negatif naik drastis menjadi 0,83, serta nilai ROC-AUC meningkat hingga 0,89. Analisis feature importance dan WordCloud juga memperlihatkan bahwa model dapat mengenali kata-kata yang menjadi indikator kuat sentimen pelanggan. Dengan demikian, metode yang diusulkan terbukti efektif dalam meningkatkan kualitas klasifikasi sentimen dan dapat menjadi dasar pengembangan sistem analisis opini pada platform  e-commerce.
Downloads
References
P. H. C. Samanmali and R. A. H. M. Rupasingha, “Sentiment analysis on google play store app users’ reviews based on deep learning approach,†Multimed. Tools Appl., vol. 83, no. 36, pp. 84425–84453, 2024, doi: 10.1007/s11042-024-19185-w.
A. F. Njurumana, F. Hariadi, and N. B. Uly, “Analisis Sentimen Pengguna X Terkait Danantara Menggunakan Metode Support Vector Machine,†Riau J. Tek. Inform., vol. 4, no. 2, pp. 233–246, 2025, doi: 10.30606/rjti.v4i2.3439.
U. D. Gandhi, P. Malarvizhi Kumar, G. Chandra Babu, and G. Karthick, “Sentiment Analysis on Twitter Data by Using Convolutional Neural Network (CNN) and Long Short Term Memory (LSTM),†Wirel. Pers. Commun., 2021, doi: 10.1007/s11277-021-08580-3.
W. Hadi, T. D. Putra, and D. Oktafiani, “Analisis Sentimen Terhadap Review Produk Lazada Indonesia Menggunakan Random Forest Classifier,†vol. 5, pp. 2348–2357, 2025.
S. P. Azzahra, A. Azzahra, Y. A. Apriyanto, and A. Wijaya, “Analisis ulasan produk amazon menggunakan Random Forest sentimen dan probabilistic retrieval model,†J. Informatics Busines, vol. 02, no. 04, pp. 519–528, 2025.
Y. Filahi, O. M. Gul, and A. Elghirani, “Enhanced E-commerce decision-making through sentiment analysis using machine learning-based approaches and IoT,†pp. 1–33, 2025, doi: 10.1371/journal.pone.0326744.
H. Chen and Y. Zhu, “Improved TF-IDF-Based LDA Topic Clustering Model for Specific Commodity Contexts and Different Sentiment Tendencies,†vol. 0, 2023, doi: 10.3233/FAIA230934.
K. Marzuki, L. G. Rady Putra, H. Hairani, L. Z. A. Mardedi, and J. X. Guterres, “Performance Improvement of The Random Forest Method Based on Smote-Tomek Link on Lombok Tourism Analysis Sentiment,†J. Bumigora Inf. Technol., vol. 5, no. 2, 2024, doi: 10.30812/bite.v5i2.3166.
A. Anggrawan, H. Hairani, and C. Satria, “Improving SVM Classification Performance on Unbalanced Student Graduation Time Data Using SMOTE,†Int. J. Inf. Educ. Technol., vol. 13, no. 2, pp. 289–295, 2023, doi: 10.18178/ijiet.2023.13.2.1806.
Khoirotulmuadiba Purifyregalia, Khothibul Umam, Nur Cahyo Hendro Wibowo, and Maya Rini Handayani, “Detecting Fake Reviews in E-Commerce: A Case Study on Shopee Using Support Vector Machine and Random Forest,†J. Appl. Informatics Comput., vol. 9, no. 3, pp. 955–965, 2025, doi: 10.30871/jaic.v9i3.9514.
M. F. Luthfi and K. M. Lhaksamana, “Implementation of TF-IDF Method and Support Vector Machine Algorithm for Job Applicants Text Classification,†J. Media Inform. Budidarma , vol. 4, no. 4, 2020.
D. Pakpahan, V. Siallagan, and S. Siregar, “Classification of E-commerce Product Descriptions with The Tf-Idf and Svm Methods,†sinkron, vol. 8, no. 4, 2023, doi: 10.33395/sinkron.v8i4.12779.
B. Baskoro, Bayu, I. Susanto, and S. Khomsah, “Analisis Sentimen Pelanggan Hotel di Purwokerto Menggunakan Metode Random Forest dan TF-IDF (Studi Kasus: Ulasan Pelanggan Pada Situs TRIPADVISOR),†J. Informatics, Inf. Syst. Softw. Eng. Appl. Anal., vol. 3, no. 2, 2021.
N. Rofiq and S. L. M. Sitio, Pengenalan Dasar Analisis Data dengan Python di Google Colab. Eureka Media Aksara, 2024.
S. Lina, M. Sitio, and N. Rofiq, “Classification of Creditworthy Customer Using Support Vector Machine Algorithm,†vol. 10, no. 2, pp. 339–345, 2025, doi: 10.31572/inotera.Vol10.Iss2.2025.ID502.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Munaldi

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Riau Jurnal Teknik Informatika provides open access to anyone so that the information and findings in these articles are useful for everyone. This journal's article content can be accessed and downloaded for free, free of charge, following the creative commons license used.

Riau Jurnal Teknik Informatika is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.



