ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS DI X: KOMPARASI NAIVE BAYES DAN SVM
SENTIMENT ANALYSIS OF THE FREE NUTRITIOUS MEALS PROGRAM ON X: A COMPARISON OF NAIVE BAYES AND SUPPORT VECTOR MACHINE (SVM)
DOI:
https://doi.org/10.52972/hoaq.vol17no2.p318-329Keywords:
Analisis Sentimen, makan bergizi gratis, Naive Bayes, Support Vector Machine, SMOTE, Media sosial XAbstract
Program Makan Bergizi Gratis (MBG) memicu diskursus publik masif di platform X (Twitter) dengan konteks linguistik yang kompleks dan distribusi kelas yang tidak seimbang. Penelitian ini bertujuan untuk menganalisis sentimen masyarakat sekaligus membandingkan performa algoritma Multinomial Naive Bayes (MNB) dan Support Vector Machine (SVM/LinearSVC) berbasis ekstraksi fitur Term Frequency-Inverse Document Frequency (TF-IDF) dan penanganan class imbalance menggunakan Synthetic Minority Over-sampling Technique (SMOTE). Dataset dilabeli secara otomatis menggunakan pendekatan leksikon dan divalidasi manual (N = 100) berbasis konteks pragmatik. Evaluasi reliabilitas pelabelan manual menghasilkan nilai Cohen's Kappa\kappa = 0,6425 (substantial agreement), yang mengungkap adanya bias asimetris pada leksikon otomatis dalam mengenali sentimen negatif (Recall = 51,35% ). Untuk mencegah kebocoran data (data leakage), SMOTE diterapkan secara per-fold pada skema Stratified 5-Fold Cross-Validation dan train-set only pada skema hold-out split 80:20. Hasil pengujian Cross-Validation menunjukkan SVM secara konsisten mengungguli MNB dengan rata-rata akurasi 81,25% \pm 2,37% berbanding 59,58% \pm 2,34% . Pada evaluasi data uji (80:20), SVM mencapai akurasi 83,26% dan Macro F1-score 0,78 , sedangkan MNB hanya mencapai akurasi 60,93% dan Macro F1-score 0,59 . Hasil ini membuktikan bahwa SVM lebih adaptif dalam memisahkan batas keputusan pada teks opini publik yang kaya akan konteks, frasa implisit, dan sarkasme.
The Free Nutritious Meal (MBG) program has triggered massive public discourse on platform X (Twitter), characterized by complex linguistic contexts and imbalanced class distributions. This study aims to analyze public sentiment and compare the performance of Multinomial Naive Bayes (MNB) and Support Vector Machine (SVM/LinearSVC) algorithms using Term Frequency-Inverse Document Frequency (TF-IDF) feature extraction and Synthetic Minority Over-sampling Technique (SMOTE) for class imbalance mitigation. The dataset was automatically labeled using a lexicon approach and manually validated ( N = 100 ) based on pragmatic context. Reliability evaluation of manual annotation yielded a Cohen’s Kappa of \kappa = 0.6425 (substantial agreement), revealing a systematic one-directional bias in the automated lexicon toward underestimating negative sentiment (Recall = 51.35% ). To prevent data leakage, SMOTE was strictly applied per-fold during Stratified 5-Fold Cross-Validation and exclusively on the training set in the 80:20 hold-out split scheme. Cross-validation results demonstrated that SVM consistently outperformed MNB, achieving a mean accuracy of 81.25% \pm 2.37% compared to 59.58% \pm 2.34% . On the 80:20 test evaluation, SVM achieved an accuracy of 83.26% and a Macro F1-score of 0.78 , whereas MNB achieved an accuracy of 60.93% and a Macro F1-score of 0.59 . These findings confirm that SVM is significantly more robust in establishing decision boundaries for public opinion text containing implicit phrasing, domain-specific terminology, and sarcasm.
References
R. F. Pramesti, A. A. Firdaus, K. Yulita, and M. Thoyyibah, “ANALISIS EFISIENSI APBN ERA PRABOWO: KAJIAN EKONOMI DAN ANALISIS SENTIMEN PUBLIK,” jesya, vol. 8, no. 2, pp. 1147–1160, 2025, doi: 10.36778/jesya.v8i2.2054.
N. P. Zakiyah, K. Umam, and A. A. Mahfudh, “Public Opinion on The MBG Program: Comparative Evaluation of InSet and VADER Lexicon Labeling Using SVM on Platform X,” Journal of Applied Informatics and Computing, vol. 9, no. 6, pp. 3397–3944, 2025, doi: 10.30871/jaic.v9i6.9978.
M. Ajito and T. Osada, “Fundamental Research on X (formerly Twitter) Attitude Survey on Utsunomiya LRT Project,” International Journal of Intelligent Transportation Systems Research, vol. 23, no. 2, pp. 939–950, Aug. 2025, doi: 10.1007/s13177-025-00491-y.
A. Albladi, M. Islam, and C. Seals, “Sentiment Analysis of Twitter Data Using NLP Models: A Comprehensive Review,” IEEE Access, vol. 13, pp. 30444–30468, 2025, doi: 10.1109/access.2025.3541494.
S. Labafi, S. Ebrahimzadeh, M. M. Kavousi, H. Abdolhossein Maregani, and S. Sepasgozar, “Using an Evidence-Based Approach for Policy-Making Based on Big Data Analysis and Applying Detection Techniques on Twitter,” Big Data and Cognitive Computing, vol. 6, no. 4, Dec. 2022, doi: 10.3390/bdcc6040160.
L. N. Hakim, F. M. Hana, and W. C. Wahyudin, “Klasifikasi Komentar Toksik Berbahasa Indonesia di Media Sosial Berbasis Fine-Tuning IndoBERT,” JURIKOM (Jurnal Riset Komputer), vol. 13, no. 1, pp. 202–209, Feb. 2026, doi: 10.30865/jurikom.v13i1.9449.
A. R. Masa’id and A. Rosyid,, “Analisis Sentimen Kritik Dan Saran Peserta Pelatihan Menggunakan Algoritma Naïve Bayes Dan Support Vector Machine,” JURIKOM (Jurnal Riset Komputer), vol. 13, no. 2, pp. 689–703, Apr. 2026, doi: 10.30865/jurikom.v13i2.9700.
G. Kaur and A. Sharma, “A deep learning-based model using hybrid feature extraction approach for consumer sentiment analysis,” J. Big Data, vol. 10, p., 2023, doi: 10.1186/s40537-022-00680-6.
M. A. A. Montaser, B. P. Ghosh, A. Barua, F. Karim, B. C. Das, R. R. Shawon, and M. S. R. Chowdhury “Sentiment analysis of social media data: Business insights and consumer behavior trends in the USA,” Edelweiss Applied Science and Technology, p., 2025, doi: 10.55214/25768484.v9i1.4164.
N. Afifah, D. Permana, D. Vionanda, and D. Fitria, “Sentiment Analysis of Electric Cars Using Naive Bayes Classifier Method,” UNP Journal of Statistics and Data Science, pp. 289-296, 2023, doi: 10.24036/ujsds/vol1-iss4/68.
D. Silaban, Gracia Simatupang, and Sardo Pardingotan Sipayung, “Public Sentiment Analysis of Free Nutritious Meal Program Discourse on Social Media X Using Support Vector Machine N-Gram Features Based,” Tech-E, vol. 9, no. 2, pp. 180–191, Feb. 2026, doi: 10.31253/te.v9i2.4355.
A. Z. Muhabbab, B. Bunyamin, and H. 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, p. 884, Dec. 2025, doi: 10.30829/zero.v9i3.27629.
A. Fernández, S. García, F. Herrera, and N. V. Chawla, “SMOTE for Learning from Imbalanced Data: Progress and Challenges, Marking the 15-year Anniversary,” 2018. doi: 10.1613/jair.1.11192.
R. Budianoor, S. W. Saputro, F. Abadi, R. A. Nugroho, and A. Farmadi, “Quantifying the Impact of Text Preprocessing on IndoBERT Fine-Tuning for Indonesian Informal Culinary Sentiment Analysis,” Journal of Computing Theories and Applications, vol. 3, no. 4, pp. 564–581, May 2026, doi: 10.62411/jcta.15980.
M. Mursyid, A. Setiawan, and M. Arifin, “Implementation of IndoBERT in Sentiment Analysis of Free Nutritious Meal Programs on the X Social Media Platform,” Jurnal Teknologi Informasi dan Pendidikan, vol. 19, no. 1, pp. 1228–1242, Mar. 2026, doi: 10.24036/jtip.v19i1.1104.
H. Ma’rifah, A. P. Wibawa, and M. I. Akbar, “Klasifikasi Artikel Ilmiah Dengan Berbagai Skenario Preprocessing,” Sains, Aplikasi, Komputasi dan Teknologi Informasi, vol. 2, no. 2, 2020, doi: 10.30872/jsakti.v2i2.2681.
H. Ataseven and Ö. Çokluk Bökeo?lu, “Investigating the Robustness of Text Mining Classification Algorithms: A Study of Algorithm and Expert Performance on Class-Inconsistent Data,” Sakarya University Journal of Computer and Information Sciences, vol. 8, no. 3, pp. 422–440, Sep. 2025, doi: 10.35377/saucis...1626239.
M. Koppel and J. Schler, “The Importance of Neutral Examples for Learning Sentiment,” Comput. Intell., vol. 22, no. 2, pp. 100–109, May 2006, doi: https://doi.org/10.1111/j.1467-8640.2006.00276.x.
S. Mohammad, S. Kiritchenko, and X.-D. Zhu, “NRC-Canada: Building the State-of-the-Art in Sentiment Analysis of Tweets,” ArXiv, vol. abs/1308.6242, p., 2013, doi: 10.48550/arxiv.1308.6242.
Y. Wahba, N. Madhavji, and J. Steinbacher, “A Comparison of SVM against Pre-trained Language Models (PLMs) for Text Classification Tasks,” pp. 304–313, 2022, doi: 10.48550/arxiv.2211.02563.
M. Dwi Anggraeni, A. Chandra Yudiananta, A. Hasna Arifin, W. Arifin, I. Mahfudz, and Y. Tri Fauzi, “‘Jurnal Transformasi (Informasi & Pengembangan IPTEK)’ (STMIK Bina Patria) Analisis Sentimen Masyarakat Terhadap Permasalahan Keracunan Program Makan Bergizi Gratis (MBG) pada Sosial Media ‘X,’” Jurnal Transformasi, vol. 21, no. 2, pp. 77–89, 2025, doi: 10.56357/jt.v21i2.469.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 HOAQ (High Education of Organization Archive Quality) : Jurnal Teknologi Informasi

This work is licensed under a Creative Commons Attribution 4.0 International License.
Jurnal HOAQ (High Education of Organization Archive Quality) : Jurnal Teknologi Informasi diterbitkan berdasarkan lisensi Creative Commons Attribution 4.0 International License (CC BY 4.0). Lisensi ini memungkinkan setiap orang untuk Berbagi: menyalin dan mendistribusikan kembali materi ini dalam format atau bentuk apapun; Adaptasi: merombak, mengubah, dan membuat turunan dari materi ini untuk keperluan apa pun, termasuk keperluan komersial, asalkan mereka memberikan pengakuan kepada Penulis Asli atas hasil karya aslinya.












