Performance Comparison of Naive Bayes and Support Vector Machine (SVM) Methods in Public Sentiment Analysis of the Free Nutritious Meal Program (MBG)
Perbandingan Kinerja Metode Naive Bayes dan Support Vector Machine (SVM) dalam Analisis Sentimen Publik terhadap Program Makan Bergizi Gratis (MBG)
DOI:
https://doi.org/10.21070/ups.11394Keywords:
sentiment analysis, Naive Bayes, Support Vector Machine, Makan Bergizi Gratis, XAbstract
The Free Nutritious Meal Program (MBG) launched by the Indonesian government has triggered diverse public discourse on social media. This study compares Naive Bayes and Support Vector Machine (SVM) in classifying public sentiment toward the MBG program using 1,050 valid Indonesian-language tweets collected via web scraping during January–December 2025. Text preprocessing included case folding, cleaning, tokenizing, stopword removal, and stemming using Sastrawi, followed by TF-IDF feature extraction, yielding 2,920 features. The dataset was split into 840 training and 210 testing samples. Results show Naive Bayes achieved slightly higher scores than SVM across all metrics, with 70.48% accuracy, 71.14% precision, 70.48% recall, and 69.73% F1-score, versus SVM's 68.57% accuracy. Naive Bayes was also far more computationally efficient, training about 52 times faster than SVM. Sentiment distribution was relatively balanced (Neutral 34.2%, Positive 33.0%, Negative 32.8%), indicating the public remained in a critical evaluation phase toward the program.
Downloads
References
A. Supian, B. Tri Revaldo, N. Marhadi, L. Efrizoni, and R. Rahmaddeni, “Perbandingan Kinerja Naive Bayes Dan SVM Pada Analisis Sentimen Twitter Ibukota Nusantara,” J. Ilm. Inform., vol. 12, no. 01, pp. 15–21, 2024.
T. Widyanto, I. Ristiana, and A. Wibowo, “Komparasi Naive Bayes dan SVM Analisis Sentimen RUU Kesehatan di Twitter,” SINTECH, vol. 6, no. 3, pp. 147–161, 2023.
F. Amandasari and Damayanti, “Perbandingan Kinerja Support Vector Machine dan Naive Bayes dalam Klasifikasi Sentimen Twitter Terhadap Pelayanan BPJS,” J. Pendidik. dan Teknol. Indones., vol. 5, no. 3, pp. 645–653, 2025.
W. Ningsih, B. Alfianda, and D. Wulandari, “Comparison of Naive Bayes and SVM Algorithms in Twitter Sentiment Analysis on Electric Car Use in Indonesia,” MALCOM, vol. 4, no. 2, pp. 556–562, 2024.
H. Sujadi, S. Fajar, and C. Roni, “Analisis Sentimen Pengguna Media Sosial Twitter terhadap Wabah Covid-19 dengan Metode Naive Bayes Classifier dan Support Vector Machine,” Infotech, vol. 8, no. 1, pp. 22–27, 2022.
F. Matheos Sarimole, “Analisis Sentimen Terhadap Aplikasi Satu Sehat Pada Twitter Menggunakan Algoritma Naive Bayes Dan Support Vector Machine,” J. Sains dan Teknol., vol. 5, no. 3, pp. 1–8, 2024.
P. Syahputra and R. Kurniawan, “Analisis Sentimen Terhadap Kesehatan Mental Remaja Menggunakan Metode Naive Bayes,” J. Inf. Syst. Res., vol. 5, no. 4, pp. 1216–1224, 2024.
A. Sitanggang, Y. Umaidah, and R. I. Adam, “Analisis Sentimen Masyarakat Terhadap Program Makan Siang Gratis Pada Media Sosial X Menggunakan Algoritma Naive Bayes,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 3, 2024.
N. P. G. Naraswati, D. C. Rosmilda, D. Desinta, F. Khairi, R. Damaiyanti, and R. Nooraeni, “Analisis Sentimen Publik dari Twitter Tentang Kebijakan Penanganan Covid-19 di Indonesia dengan Naive Bayes Classification,” J. Sist. Inf., vol. 10, no. 1, pp. 228–238, 2021.
M. W. Arif and K. Kustiyono, “Analisis Sentimen Kebijakan Makan Bergizi Gratis di Media Sosial Menggunakan Natural Language Processing Berbasis Python TextBlob di Indonesia,” J. Pendidik. dan Teknol. Indones., vol. 5, no. 9, pp. 2463–2471, 2025.
N. A. Maulana and D. Darwis, “Perbandingan Metode SVM dan Naive Bayes untuk Analisis Sentimen pada Twitter tentang Obesitas di Kalangan Gen Z,” J. Pendidik. dan Teknol. Indones., vol. 5, no. 3, pp. 655–666, 2025.
Y. Findawati, I. R. I. Astutik, A. S. Fitroni, I. Indrawati, and N. Yuniasih, “Comparative analysis of Naïve Bayes, K Nearest Neighbor and C.45 method in weather forecast,” J. Phys. Conf. Ser., vol. 1402, no. 6, 2019, doi: 10.1088/1742-6596/1402/6/066046.
Ratih Puspitasari, Y. Findawati, and M. A. Rosid, “Sentiment Analysis of Post-COVID-19 Inflation Based on Twitter Using the K-Nearest Neighbor and Support Vector Machine Classification Methods,” J. Tek. Inform., vol. 4, no. 4, pp. 669–679, 2023, doi: 10.52436/1.jutif.2023.4.4.801.
Downloads
Additional Files
Posted
License
Copyright (c) 2026 UMSIDA Preprints Server

This work is licensed under a Creative Commons Attribution 4.0 International License.
