Comparison of Naive Bayes, Support Vector Machine, and Indobert Methods for Classifying Public Sentiment towards the MBG Program on Platform X - Hanya Abriananta; Khothibul Umam; Nur Cahyo Hendro Wibowo; Maya Rini Handayani (Journal of Applied Informatics and Computing, 2026)
This study compares the effectiveness of three machine learning algorithms, namely Naive Bayes, Support Vector Machine (SVM), and IndoBERT, in classifying public sentiment towards the Free Nutritional Meal (MBG) program on Platform X. A total of 1,176 Indonesian language tweets were collected through Selenium-based web scraping from January 1 to March 31, 2025. Sentiment labeling using a lexicon-based approach with 51 positive domain-specific words and 50 negative domain-specific words, coupled with negation pattern detection, resulted in 62.8% positive tweets and 37.2% negative tweets. Preprocessing for Naive Bayes and SVM followed a six-stage workflow including stemming through PySastrawi, while IndoBERT used a minimal preprocessing approach to retain contextual information. Feature extraction applied TF-IDF with a maximum of 1,500 features and a unigram-bigram-n-gram range, with a stratified data split of 80:20. IndoBERT achieved the highest accuracy of 81.4% with a weighted F1 score of 0.81, followed by SVM at 74.2% (F1 score of 0.74) and Naive Bayes at 72.5% (F1 score of 0.72). A Wilcoxon signed-rank test on 5-fold cross-validation confirmed that the performance difference between Naive Bayes and SVM was not statistically significant (p > 0.05). These findings provide empirical evidence for policymakers to monitor public acceptance of government nutrition programs through social media analysis.