This study aims to compare the performance of Naïve Bayes and Random Forest methods in classifying user satisfaction opinions on four digital wallets (OVO, DANA, GoPay, ShopeePay) on Twitter. Data were collected through crawling using the Tweepy library, totaling 10,038 tweets from April 2024 to April 2026. Preprocessing included cleaning, case folding, tokenizing, stopword removal, and stemming. Sentiment labeling was manually conducted into three classes: positive, negative, and neutral. Data were split into training set (80%) and testing set (20%) with random_state=42. Feature weighting used TF-IDF resulting in 5,498 unique word features. The results show that Random Forest achieved 100% accuracy, 100% precision, 100% recall, and 100% F1-score, while Naïve Bayes achieved 96.86% accuracy, 96.85% precision, 96.86% recall, and 96.49% F1-score. The Random Forest method outperformed Naïve Bayes in all evaluation metrics with an accuracy difference of 3.14%. However, Naïve Bayes has an advantage in computational time (0.03 seconds) compared to Random Forest (1.36 seconds). This study contributes a transparent performance baseline for further digital wallet sentiment analysis research.
Copyrights © 2026