Perbandingan Kinerja Naive Bayes dan SVM dalam Analisis Sentimen Program Makanan Bergizi Gratis (MBG) sebagai Pendukung Pengambilan Keputusan
Abstract
The Free Nutritious Meal Program is one of the Indonesian government programs aimed at improving community nutritional quality and reducing stunting rates. The program has generated various publik responses expressed through media social platforms, particularly in YouTube comment sections. This study was conducted to analyze publik sentiment toward the Free Nutritious Meal Program (MBG) and to compare the performance of the Naive Bayes and Support Vector Machine (SVM) algorithms in classifying sentiment from YouTube user comments. The research data were obtained through a YouTube comment scraping process and then processed through several preprocessing stages, including cleaning, case folding, normalization, tokenization, stopword removal, and stemming. Furthermore, feature weighting was performed using the TF-IDF method, and data labeling was carried out using a lexicon-based approach. The sentiment classification process employed the Naive Bayes and Support Vector Machine (SVM) algorithms, while model evaluation was conducted using confusion matrix, accuracy, precision, precision, and f1-score metrics. The results showed that the Support Vector Machine (SVM) algorithm achieved better performance than Naive Bayes. The SVM algorithm obtained an accuracy of 77.4%, precision of 78.4%, precision of 77.4%, and f1-score of 77.6%, whereas the Naive Bayes algorithm achieved an accuracy of 70.5%, precision of 74.4%, precision of 70.5%, and f1-score of 67.7%. The main contribution of this study is the comparative evaluation of Naive Bayes and Support Vector Machine (SVM) for classifying public sentiment from YouTube comments related to the MBG program, providing empirical evidence on the most effective classification approach for supporting social media–based public opinion analysis of government policies.
Downloads
References
A. Putriyekti et al., “Analisis Multidimensional Sentimen Masyarakat Terhadap Program Makan Bergizi Gratis Pada Media Sosial X,” Integrative Perspectives of Social and Science Journal, vol. 2, no. 1, pp. 1004–1024, Feb. 2025, doi: https://ipssj.com/index.php/ojs/article/view/142.
I. Abdul Ghofur, A. Dasa Putri, A. Sentimen, N. Bayes, and P. Makan Bergizi Gratis, “Perbandingan Kinerja Svm, Knn, Dan Naïve Bayes Pada Analisis Sentimen Tweet Mbg Kata Kunci,” Computer Based Information System Journal, vol. 14, no. 01, pp. 100–117, Mar. 2026, doi: https://doi.org/10.33884/cbis.v14i1.10994.
R. Hidayat and D. J. Ratnaningsih, “Analisis Sentimen Program Makanan Bergizi Gratis Menggunakan Algoritma Random Forest dan Naive Bayes,” Journal of Computing and Informatics Research, vol. 5, no. 1, pp. 395–400, 2025, doi: 10.47065/comforch.v5i1.2355.
K. Yoga Pratama, S. Achmadi, and K. A. Sari, “Analisis Sentimen Terhadap Makan Bergizi Gratis Pada Sosial Media X Menggunakan Metode Decicion Tree Dengan Pembanding Naive Bayes,” Jurnal Mahasiswa Teknik Informatika), vol. 9, no. 6, pp. 11061–11067, Dec. 2025, doi: https://doi.org/10.36040/jati.v9i6.15525.
P. M. Kadafi, H. Z. Riyadi, R. S. G. Raya, Ika Kurniawati, Waeisul Bismi, and Riza Fahlapi, “Penerapan Machine Learning Untuk Analisis Sentimen Program Mbg Pada Platform X Dan Youtube,” INFOTECH journal, vol. 12, no. 1, pp. 67–74, Mar. 2026, doi: 10.31949/infotech.v12i1.17472.
Z. Fatah and R. A. Ningsih, “Analisis Sentimen Komentar YouTube terhadap Tragedi Demo 25 Agustus Menggunakan Pendekatan Lexicon-Based,” JAMASTIKA, vol. 4, pp. 217–224, Oct. 2025, doi: https://doi.org/10.35473/jamastika.v4i2.4525.
N. D. Firdaus and R. R. Suryono, “Perbandingan Algoritma Naive Bayes dan SVM dalam Analisis Sentimen Pengguna AI di Platform X,” Technology and Science (BITS), vol. 6, no. 4, 2025, doi: 10.47065/bits.v6i4.7081.
R. Marta Dinata, E. Rayhana, V. Hadi, and U. Alkaf, “Analisis Komprehensif Kinerja Model Klasifikasi Sentimen: Evaluasi Lintas Metrik Pada Dataset Tweet Film Bahasa Indonesia,” Jurnal Rekayasa Informasi, vol. 14, no. 1, pp. 38–47, Jul. 2025, doi: https://journal.istn.ac.id/index.php/rekayasainformasi/article/view/2361/1472.
W. Rayyana Muntaza, “Analisis Sentimen Tanggapan Masyarakat Terhadap Program Makan Bergizi Gratis Pada Platform YouTube Menggunakan SVM,” PROSIDING SEMINAR NASIONAL TEKNOLOGI DAN SAINS, vol. 5, pp. 297–302, Jan. 2026, doi: https://doi.org/10.29407/d2x6hw85.
O. I. Gifari, M. Adha, I. Rifky Hendrawan, F. Freddy, and S. Durrand, “Analisis Sentimen Review Film Menggunakan TF-IDF dan Support Vector Machine,” JIFOTECH (JOURNAL OF INFORMATION TECHNOLOGY, vol. 2, no. 1, pp. 36–40, Mar. 2022, doi: 10.46229/jifotech.v2i1.330.
T. A. Y. S. N. A. V. Mi’raj Fattah, “Analisis Komparasi TF-IDF dan Word2Vec pada Algoritma SVM Untuk Sentimen Pembangunan IKN di YouTube,” JURNAL BUFFER INFORMATIKA, vol. 12, no. 1, pp. 25–34, Oct. 2026, doi: https://doi.org/10.25134/buffer.v12i1.551.
R. Yulika Go, H. Sarah Divanda Gaspersz, R. Hendra Kusumawardhana, and N. Aeni Hidayah, “Analisis Sentimen Publik Program Makan Bergizi Gratis (MBG) di Youtube: Perbandingan Kinerja Algoritma Support Vector Machine (SVM) dan Random Forest,” JURNAL ILMU KOMPUTER DAN TEKNOLOGI (IKOMTI), vol. 7, no. 1, pp. 24–31, Feb. 2026, doi: 10.35960/ikomti.v7i1.2424.
A. F. dan J. I. Toif Muhayat, “Analisis Sentimen Terhadap Komentar Video Youtube Menggunakan Support Vector Machines,” Progresif: Jurnal Ilmiah Komputer, vol. 19, pp. 231–240, Feb. 2023, doi: 10.35889/progresif.v19i1.1060.
S. Sofiana and A. Fitrianingsih, “Klasifikasi Sentimen Publik Terhadap Makanan Bergizi Gratis Berbasis Algoritma Decision Tree,” IKN: Jurnal Informatika dan Kesehatan, vol. 3, no. 1, pp. 13–21, Feb. 2026, doi: https://doi.org/10.35473/ikn.v3i1.4885.
R. Amelia Br Siregar, A. Ramadhan Manik, A. Syahri, M. Budi Akbar, F. Ramadhani, and J. W. Iskandar Psr V Medan Esatate Kab Deli Serdang, “Penerapan Naïve Bayes Untuk Analisis Sentimen Netizen Terhadap Program Makan Siang Gratis Pada Media Social X,” Jurnal Mahasiswa Teknik Informatika), vol. 9, no. 4, pp. 5621–5628, 2025, doi: https://doi.org/10.36040/jati.v9i4.13870.
F. C. E. W. Adi Ariyo Munandar, “Sentimen Analisis Aplikasi Belajar Online Menggunakan Klasifikasi SVM,” JOINTECS (Journal of Information Technology and Computer Science), vol. 7, no. 2, pp. 77–84, Jul. 2023, doi: JOINTECS(JournalofInformationTechnologyandComputerScience).
Z. Prisdian Tiararosa, I. Sani Wijaya, and E. Rohaini, “Perbandingan SVM dan Naive Bayes pada Analisis Sentimen MBG di Platform TikTok dan Instagram,” Jurnal Informatika Dan Rekayasa Komputer (JAKAKOM), vol. 1, p. 1983, Apr. 2026, doi: 10.33998/jakakom.v6i1.
P. Prayesy, A. Pujakesuma, and M. R. Qisthiano, “Evaluasi Kinerja Random Forest dan Naïve Bayes untuk Prediksi Risiko Kredit Berdasarkan Pekerjaan Debitur,” Explore, vol. 15, no. 2, pp. 114–120, Jul. 2025, doi: 10.35200/ex.v15i2.175.
B. Hakim, “Analisa Sentimen Data Text Preprocessing Pada Data Mining Dengan Menggunakan Machine Learning,” JBASE - Journal of Business and Audit Information Systems, vol. 4, no. 2, Aug. 2021, doi: 10.30813/jbase.v4i2.3000.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Perbandingan Kinerja Naive Bayes dan SVM dalam Analisis Sentimen Program Makanan Bergizi Gratis (MBG) sebagai Pendukung Pengambilan Keputusan
Pages: 623-634
Copyright (c) 2026 Vebi Adeka Putra, Nirwana Hendrastuty

This work is licensed under a Creative Commons Attribution 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 Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment 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 acknowledgment 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 (Refer to The Effect of Open Access).





















