Sentiment Analysis of the Free Nutritious Meals Program on the X Platform Using Naïve Bayes and SVM
DOI:
https://doi.org/10.55537/cosie.v5i4.1928Keywords:
Analisis sentimen, makan bergizi gratis, machine learning, Naïve Bayes, Support Vector MachineAbstract
The Free Nutritious Meals (MBG) program is a government program aimed at supporting nutritional fulfillment and improving human resource quality. The high level of public interaction on X makes the platform a potential source of data for identifying public responses to the implementation of MBG. This study aims to analyze public sentiment toward the MBG program and compare the performance of the Naïve Bayes and Support Vector Machine (SVM) algorithms. The research data consisted of 5,048 Indonesian-language tweets collected through Browser Automation Scraping. The data were processed through cleaning, case folding, normalization, tokenizing, stopword removal, and stemming, followed by sentiment labeling into positive, neutral, and negative categories using a lexicon-based approach. The dataset was divided using an 80:20 ratio into 3,810 training data and 953 test data. SMOTE was applied to the training data to address class imbalance. The results showed that Naïve Bayes achieved an accuracy of 35.36% before SMOTE and increased to 70.20% after SMOTE. SVM with SMOTE achieved an accuracy of 85.73%, correctly classifying 817 of 953 test data, which was 15.53 percentage points higher than Naïve Bayes with SMOTE. These results indicate a difference in the performance of the two algorithms, with SVM achieving higher overall classification performance on the research dataset.
Downloads
References
[1] L. Tsabitah, D. A. Karima, Z. D. P. Munaspin, N. M. Titiana, and F. Fathoni, “Analisis Sentimen Program Makan Siang Gratis Dalam Mendukung SDGS Menggunakan Naïve Bayes,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 4, pp. 6288–6294, 2025.
[2] P. M. Jakak, M. Rohman, and others, “Analisis Sentimen Public Program Makan Bergizi Gratis Platform Instagram Dengan Algoritma Svm,” Smartics J., vol. 11, no. 1, pp. 14–20, 2025.
[3] S. Andini, R. Kurniawan, and S. Anwar, “Analisis Sentimen Pengguna X Mengenai Opini Masyarakat Tentang Dinasti Politik Menggunakan Algoritma Naïve Bayes,” J. Inform. dan Tek. Elektro Terap., vol. 13, no. 2, 2025.
[4] A. N. Yusril, I. Larasati, and Q. Aini, “Implementasi Text Mining untuk Advertising dengan Menggunakan Metode K-Means Clustering pada Data Tweets Gojek Indonesia,” Sist. J. Sist. Inf., vol. 9, no. 3, pp. 586–596, 2020.
[5] B. Siswoyo and N. A. P. Utomo, “Pemanfaatan machine learning untuk klasifikasi sentimen pelanggan pada media sosial,” J. Teknol. Inf. Digit., vol. 1, no. 1, pp. 29–34, 2025.
[6] F. Pedregosa et al., “Scikit-learn: Machine learning in Python,” J. Mach. Learn. Res., vol. 12, pp. 2825–2830, 2011.
[7] P. Bintoro, R. Ratnasari, E. Wihardjo, I. P. Putri, and A. Asari, “Pengantar machine learning,” 2024, PT MAFY MEDIA LITERASI INDONESIA.
[8] S. N. Aziza, L. Somantri, and I. Setiawan, “Analisis Pemetaan Tingkat Rawan Banjir di Kecamatan Bontang Barat Kota Bontang Berbasis Sistem Informasi Geografis,” JJPG Jur. Pendidik. Geogr., vol. 9, no. 2, pp. 109–120, 2021.
[9] E. Nirmala, Metode Klasifikasi Modern Dalam Machine Learning Menggunakan Python. Media Pustaka Indo, 2026.
[10] P. R. Indonesia, “Peraturan Presiden Republik Indonesia Nomor 83 Tahun 2024 tentang Badan Gizi Nasional,” Sekr. Negara Republik Indones., 2024.
[11] A. Setiawan and R. R. Suryono, “Analisis Sentimen Ibu Kota Nusantara menggunakan Algoritma Support Vector Machine dan Naïve Bayes,” Edumatic J. Pendidik. Inform., vol. 8, no. 1, pp. 183–192, 2024.
[12] H. Ali and N. Hendrastuty, “Comparison of Naïve Bayes Classifier, Support Vector Machine, Random Forest Algorithms for Public Sentiment Analysis of Kip-K Program on Twitter,” J. Tek. Inform., vol. 5, no. 6, pp. 1701–1712, 2024.
[13] D. Masitoh, R. R. Setiawan, and S. Adiyono, “Sentimen Analisis Mobile Banking Menggunakan Algoritma Naïve Bayes Dan Support Vector Machine Pada Google Play Store,” IDEALIS Indones. J. Inf. Syst., vol. 9, no. 2, pp. 326–335, 2026.
[14] M. F. Saleh and R. Imanda, “Public Sentiment Analysis of the Free Meal Program: A Comparison of Naïve Bayes and Support Vector Machine Methods on the Twitter (X) Social Media Platform,” J. Appl. Informatics Comput., vol. 9, no. 1, pp. 131–139, 2025.
[15] I. B. N. W. Manuaba, G. R. Dantes, and G. Indrawan, “Analisis sentimen data provider layanan internet pada twitter menggunakan support vector machine dengan penambahan algoritma levenshtein distance,” J. SISKOM-KB (Sistem Komput. dan Kecerdasan Buatan), vol. 5, no. 2, pp. 9–17, 2022.
[16] M. H. Arfian et al., “Analisis Sentimen Pada Media Sosial Menggunakan Metode Support Vector Machine,” J. Ilmu Tek. dan Komput., vol. 9, no. 01, pp. 1–6, 2025.
[17] H. Y. Pradana, I. Slamet, and E. Zukhronah, “Analisis Sentimen Kinerja Pemerintahan Menggunakan Algoritma NBC, KNN, dan SVM,” Pros. Simp. Nas. Multidisiplin, vol. 4, pp. 114–121, 2022.
[18] N. Sari, “Penerapan Algoritma Klasifikasi Naïve Bayes Dan Support Vector Machine Untuk Analisis Sentimen Cyberbullying Bilingual Di Aplikasi X,” J. Sist. Sist. Inf., vol. 14, no. 1, 2025.
[19] K. S. Amalia, A. Dzulkarnain, and B. R. Lidyawati, “Comparison Of Split Data Ratio Performance In Sentiment Analysis Of Pon XXI Aceh-Sumut 2024 Using Support Vector Machine With Smote Application,” J. Sist. Inf. dan Inform., vol. 9, no. 1, pp. 55–66, 2026.
[20] K. Y. Pratama, S. Achmadi, and K. A. Sari, “Analisis Sentimen Terhadap Makan Bergizi Gratis Pada Sosial Media X Menggunakan Metode Decicion Tree Dengan Pembanding Naïve Bayes,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 6, pp. 11061–11067, 2025.
[21] F. Haerani, “Analisis Sentimen Program Makan Bergizi Gratis Berdasarkan Komentar Di Media Sosial X Menggunakan GRU,” J. Inform. dan Tek. Elektro Terap., vol. 14, no. 1, 2026.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 M. Jagad Kesuma, Dr. Ari Muzakir, M.Cs

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


