Performance Comparison of 10 Machine Learning Algorithms in Sentiment Classification on Platform X Regarding the Government’s Priority Program: Makanan Bergizi Gratis (MBG)

Authors

  • Deni Utama Information Systems and Technology, Faculty of Engineering, Universitas Negeri Jakarta, DKI Jakarta, Indonesia
  • Rauhil Fahmi Information Systems and Technology, Faculty of Engineering, Universitas Negeri Jakarta, DKI Jakarta, Indonesia
  • Muhammad Ridho Kurniawan Pratama Information Systems and Technology, Faculty of Engineering, Universitas Negeri Jakarta, DKI Jakarta, Indonesia

DOI:

https://doi.org/10.34148/teknika.v14i3.1386

Keywords:

Sentiment Analysis, Machine Learning, Ensemble Methods, Naive Bayes, Gradient Boosting, Feature Importance

Abstract

This study evaluates public sentiment on Platform X regarding the Government’s Priority Free Nutritious Food Program. A total of 2031 user comments were analyzed using 10 machine learning algorithms: Naive Bayes, Gradient Boosting, AdaBoost, Random Forest, Extra Trees, Logistic Regression, Linear SVM, SGD Classifier, Ridge Classifier, and Bagging. The dataset underwent preprocessing including lowercasing, stopword removal, stemming, and tokenization, followed by TF-IDF vectorization with 5000 features. Models were evaluated using accuracy, precision, recall, weighted F1-score, and 5-fold cross-validation. Bagging achieved the highest accuracy (81%) and weighted F1-score (81%), followed by Gradient Boosting (81%) and Random Forest (77%). Feature analysis revealed negative sentiment indicators such as ‘racun’, ‘stop’, ‘korupsi’, and positive indicators like ‘sehat’, ‘enak’, ‘bergizi’. These findings provide actionable insights for policy communication and program improvement.

Downloads

Download data is not yet available.

References

[1] “Presidential Regulation of the Republic of Indonesia No. 83 Year 2024 concerning the Establishment of the National Nutrition Agency,” 2024, Government of the Republic of Indonesia. [Online]. Available: https://peraturan.go.id

[2] “BGN on only 34 MBG kitchens having hygiene certificates: Where does the data come from?,” KOMPAS.com, 2025. [Online]. Available: https://nasional.kompas.com/read/2025/09/27/08231551

[3] “List of MBG menus that poisoned thousands of school children,” Liputan6.com, 2025. [Online]. Available: https://www.liputan6.com/news/read/6169922

[4] B. Liu, Sentiment Analysis and Opinion Mining. Morgan & Claypool Publishers, 2012. [Online]. Available: https://doi.org/10.2200/S00416ED1V01Y201204HLT016

[5] A. Fahrezi and S. Solichin, “Analisis Sentimen Ulasan Aplikasi Mobile JKN pada Play Store Menggunakan Metode Multinomial Naive Bayes,” in Proceedings of SENAFTI, 2024. [Online]. Available: https://senafti.budiluhur.ac.id/senafti/article/view/1302

[6] Y. Freund and R. E. Schapire, “A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting,” J Comput Syst Sci, vol. 55, no. 1, pp. 119–139, 1997, [Online]. Available: https://doi.org/10.1006/jcss.1997.1504

[7] Y. J. F. Harta, “Aspect-Based Sentiment Analysis of JKN Mobile App,” Jurnal Ilmu Komputer Udayana, 2024, [Online]. Available: https://ojs.unud.ac.id/index.php/JIKU

[8] D. Utama, “Sentiment Analysis of JKN Mobile Application in Health Technology Using Naive Bayes, Gradient Boosting, and AdaBoost,” in Sinergy: Inspire Conference, 2025.

[9] M. Cambria, “Affective Computing and Sentiment Analysis,” IEEE Intell Syst, 2016, [Online]. Available: https://doi.org/10.1109/MIS.2016.31

[10] B. Medhat, A. Hassan, and H. Korashy, “Sentiment Analysis Algorithms and Applications: A Survey,” Ain Shams Engineering Journal, 2014, [Online]. Available: https://doi.org/10.1016/j.asej.2014.04.011

[11] B. Pang, L. Lee, and S. Vaithyanathan, “Thumbs up?: Sentiment classification using machine learning techniques,” in Proceedings of the ACL Conference on Empirical Methods in Natural Language Processing (EMNLP), 2002, pp. 79–86. [Online]. Available: https://aclanthology.org/W02-1011

[12] P. Kouloumpis, T. Wilson, and J. Moore, “Twitter Sentiment Analysis: The Good the Bad and the OMG!,” in Proceedings of ICWSM, 2011. [Online]. Available: https://ojs.aaai.org/index.php/ICWSM/article/view/14185

[13] A. Pak and P. Paroubek, “Twitter as a Corpus for Sentiment Analysis and Opinion Mining,” in Proceedings of LREC, 2010. [Online]. Available: http://www.lrec-conf.org/proceedings/lrec2010/pdf/385_Paper.pdf

[14] S. Go, R. Bhayani, and L. Huang, “Twitter Sentiment Classification using Distant Supervision,” Stanford University, 2009. [Online]. Available: https://cs.stanford.edu/people/alecmgo/papers/TwitterDistantSupervision09.pdf

[15] H. Jung, H.-A. Park, and T.-M. Song, “Ontology-Based Approach to Social Data Sentiment Analysis: Detection of Adolescent Depression Signals,” J Med Internet Res, vol. 19, no. 7, p. e259, 2017, [Online]. Available: https://www.jmir.org/2017/7/e259/

[16] S. Ravi and K. Ravi, “A Survey on Opinion Mining and Sentiment Analysis: Tasks, Approaches and Applications,” Knowl Based Syst, 2015, [Online]. Available: https://doi.org/10.1016/j.knosys.2015.06.015

[17] P. S. Ghatora, S. E. Hosseini, S. Pervez, M. J. Iqbal, and N. Shaukat, “Sentiment Analysis of Product Reviews using Machine Learning and Pre-trained LLM,” Big Data and Cognitive Computing, vol. 8, no. 12, p. 199, 2024, [Online]. Available: https://doi.org/10.3390/bdcc8120199

[18] W. Zhang, Y. Deng, B. Liu, S. J. Pan, and L. Bing, “Sentiment Analysis in the Era of Large Language Models: A Reality Check,” arXiv preprint, 2023, [Online]. Available: https://arxiv.org/abs/2305.15005

[19] J. R. Jim, “Recent Advancements and Challenges of NLP-Based Sentiment Analysis,” Knowl Based Syst, 2024, [Online]. Available: https://doi.org/10.1016/j.knosys.2024.111019

[20] Y. Mao, “Sentiment Analysis Methods, Applications, and Challenges,” Information Fusion, 2024, [Online]. Available: https://doi.org/10.1016/j.inffus.2024.102287

[21] N. A. Sharma, “A Review of Sentiment Analysis: Tasks, Applications, and Challenges,” Journal of AI & Data Mining, 2025, [Online]. Available: https://jad.shahroodut.ac.ir/article_2475.html

[22] P. Nandwani, “A Review on Sentiment Analysis and Emotion Detection from Text,” Front Comput Sci, 2021, [Online]. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC8870731/

[23] L. Breiman, “Random forests,” Mach Learn, vol. 45, no. 1, pp. 5–32, 2001, [Online]. Available: https://doi.org/10.1023/A:1010933404324

[24] J. H. Friedman, “Greedy Function Approximation: A Gradient Boosting Machine,” Ann Stat, vol. 29, no. 5, pp. 1189–1232, 2001, [Online]. Available: https://doi.org/10.1214/aos/1013203451

Performance Comparison of 10 Machine Learning Algorithms in Sentiment Classification on Platform X Regarding the Government’s Priority Program: Makanan Bergizi Gratis (MBG)

Downloads

Published

2025-11-03

How to Cite

Performance Comparison of 10 Machine Learning Algorithms in Sentiment Classification on Platform X Regarding the Government’s Priority Program: Makanan Bergizi Gratis (MBG). (2025). Teknika, 14(3), 501-508. https://doi.org/10.34148/teknika.v14i3.1386