JOURNAL OF APPLIED INFORMATICS AND COMPUTING
Vol. 10 No. 3 (2026): June 2026

Comparison of Naive Bayes, Support Vector Machine, and Indobert Methods for Classifying Public Sentiment towards the MBG Program on Platform X

Hanya Abriananta (Universitas Islam Negeri Walisongo Semarang)
Khothibul Umam (Universitas Islam Negeri Walisongo Semarang)
Nur Cahyo Hendro Wibowo (Universitas Islam Negeri Walisongo Semarang)
Maya Rini Handayani (Universitas Islam Negeri Walisongo Semarang)



Article Info

Publish Date
17 Jun 2026

Abstract

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.

Copyrights © 2026






Journal Info

Abbrev

JAIC

Publisher

Subject

Computer Science & IT

Description

Journal of Applied Informatics and Computing (JAIC) Volume 2, Nomor 1, Juli 2018. Berisi tulisan yang diangkat dari hasil penelitian di bidang Teknologi Informatika dan Komputer Terapan dengan e-ISSN: 2548-9828. Terdapat 3 artikel yang telah ditelaah secara substansial oleh tim editorial dan ...