Comparison of Naive Bayes, Support Vector Machine, and Indobert Methods for Classifying Public Sentiment towards the MBG Program on Platform X
DOI:
https://doi.org/10.30871/jaic.v10i3.12721Keywords:
Sentiment Analysis, Free Nutritious Meals, Naive Bayes, Platform X, Support Vector MachineAbstract
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.
Downloads
References
[1] M. D. Anggraeni, A. C. Yudiananta, dan A. H. Arifin, “Analisis Sentimen Masyarakat terhadap Permasalahan Keracunan Program MBG,” Jurnal Transformasi, vol. 21, no. 2, pp. 77–89, 2025..
[2] A. Kiftiyah, F. A. Palestina, F. U. Abshar, dan K. Rofiah, "Program Makan Bergizi Gratis (MBG) dalam Perspektif Keadilan Sosial dan Dinamika Sosial-Politik," PANCASILA: Jurnal Keindonesiaan, vol. 5, no. 1, Apr. 2025, doi: 10.52738/pjk.v5i1.726.
[3] F. Wajidi and M. R. Rasyid, “Evaluasi algoritma KNN dan Naive Bayes untuk analisis sentimen kebijakan program makan bergizi gratis,” vol. 7, no. 2, pp. 83–97, 2025, doi: 10.37905/jji.v1i2.34418.
[4] V. Alviani, S. Alam, I. Kurniawan, “Analisis Sentimen Review Aplikasi Wetv Pada Platform Twitter Menggunakan Support Vector Machine,” vol. 2, no. 3, pp. 143–149, 2023.
[5] A. Ardiansyah, E. A. Pratama, and N. I. Fadlilah, “Analisis Sentimen Pengguna Terhadap Aplikasi ChatGPT Di Google Play Store : Penerapan Algoritma Support Vector Machine,” vol. 11, no. 2, pp. 247–254, 2024.
[6] M. M. Laia et al., “Analisis Sentimen Program Makan Gratis Pada Platform X Algoritma Naïve Bayes Menggunakan,” 2025.
[7] F. Fatkhurrohman, B. I. Nugroho, and N. Fadillah, “Analisis Sentimen Program Makan Bergizi Gratis Pemerintah RI Melalui Twitter Menggunakan Metode SVM,” vol. 4, no. 3, pp. 3906–3917, 2025.
[8] Anwar and I. Rahmawati, “Analisis Sentimen terhadap Kebijakan Publik Menggunakan Metode Naïve Bayes,” Jurnal Teknologi Informasi dan Komunikasi, vol. 14, no. 2, pp. 101–112, 2022.
[9] M. Apriliyani, M. I. Musyaffaq, and S. N. Aini, “Implementasi analisis sentimen pada ulasan aplikasi Duolingo di Google Playstore menggunakan algoritma Naïve Bayes,” vol. 21, no. 2, pp. 298–311, 2024.
[10] T. Grace, W. Margaretha, D. Juardi, “Analisis Sentimen Masyarakat Terhadap Penggunaan Halodoc Sebagai Layanan Telemedicine Di Indonesia,” vol. 13, no. 1, 2025.
[11] Vinne. D. U. Sinurat, Y. Prasetianti, Y., “Penerapan algoritma k-nearest neighbors (knn) dalam menganalisis sentimen ulasan aplikasi seabank pada google play store,” vol. 2, no. 2, pp. 103–113, 2025.
[12] J. Pardede, and D. Darmawan, “Perbandingan Algoritma Stemming Porter , Sastrawi , Idris , Comparison Of Stemming Algorithms Porter , Sastrawi , Idris , And Arifin Setiono On Indonesian Text Documents,” vol. 12, no. 1, 2025, doi: 10.25126/jtiik.2025128860.
[13] D. Septiani, I. Isabela, “Analisis term frequency inverse document frequency (tf-idf) dalam temu kembali informasi pada dokumen teks,” vol. 25, pp. 81–88.
[14] A. Damuri, U. Riyanto, H. Rusdianto, and M. Aminudin, “Implementasi Data Mining dengan Algoritma Naïve Bayes Untuk Klasifikasi Kelayakan Penerima Bantuan Sembako,” vol. 8, no. 6, pp. 219–225, 2021, doi: 10.30865/jurikom.v8i6.3655.
[15] H. Apriyani, “Perbandingan Metode Naïve Bayes Dan Support Vector Machine Dalam Klasifikasi Penyakit Diabetes Melitus,” vol. 1, no. 3, pp. 133–143, 2020.
[16] R. Z. Alobaidy, G. A. Altalib, and S. Zainab, “Comparative Study of Opinion Mining and Sentiment Analysis : Algorithms and Applications,” vol. 8, no. 4, pp. 12–20, 2020.
[17] [1] A. Z. Muhabbab, Bunyamin, and Hasmawati, “Sentiment Analysis of Indonesia’s Free Nutritious Meal Program on Platform X (Formerly Twitter) Using IndoBERT,” Zero: Jurnal Sains, Matematika, dan Terapan, vol. 9, no. 3, pp. 884–893, 2025, doi: 10.30829/zero.v9i3.27629..
[18] M. T. Nugraha, N. Sulistiyowati, dan U. Enri, "Analisis Sentimen Ulasan Aplikasi Satu Sehat pada Google Play Store Menggunakan Naïve Bayes Classifier," JATI (Jurnal Mahasiswa Teknik Informatika), vol. 7, no. 5, pp. 3593–3601, Okt. 2023.
[19] A. M. Ndapamuri, D. Manongga, A. Iriani, “Analisis Sentimen Ulasan Aplikasi Tripadvisor Dengan Metode Support Vector Machine , K-Nearest Neighbor , Dan Naive Bayes,” pp. 127–140, 2023.
[20] M. I. Fikri, T. S. Sabrila, and Y. Azhar, “Perbandingan Metode Naïve Bayes dan Support Vector Machine pada Analisis Sentimen Twitter,” vol. 10, pp. 71–76, 2020.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Hanya Abriananta, Khothibul Umam, Nur Cahyo Hendro Wibowo, Maya Rini Handayani

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








