Sentiment Analysis of the Free Nutritious Meal Program (MBG) on Social Media X (Twitter) Using K-Nearest Neighbor and Artificial Neural Network

Authors

  • Fernanda Amri Hakim Universitas Nahdlatul Ulama Sunan Giri Bojonegoro
  • Ifnu Wisma Dwi Prastya Universitas Nahdlatul Ulama Sunan Giri Bojonegoro
  • Jauhara Rana Budiani Universitas Nahdlatul Ulama Sunan Giri Bojonegoro

DOI:

https://doi.org/10.30871/jaic.v10i1.12205

Keywords:

Artificial Neural Network, Free Nutritious Meal Program, K-Nearest Neighbor, Sentiment Analysis, Twitter

Abstract

The Free Nutritious Meal Program (Makan Bergizi Gratis/MBG) is a national policy initiated by the Indonesian government to improve public nutritional status, particularly among children and vulnerable groups. Since its implementation, the program has generated extensive public discussion on social media, reflecting diverse opinions, support, and criticism. This study aims to analyze public sentiment toward the MBG program on social media X (Twitter) using machine learning-based text classification methods. A total of 9,038 Indonesian-language tweets were collected and processed through text preprocessing, semi-automatic sentiment labeling with manual validation, and feature extraction using the Term Frequency–Inverse Document Frequency (TF–IDF) method. Sentiments were classified into three categories: positive, neutral, and negative. The performance of K-Nearest Neighbor (KNN), Artificial Neural Network (ANN), and ANN with class balancing using Synthetic Minority Over-Sampling Technique (ANN + SMOTE) was evaluated using accuracy, precision, recall, and F1-score metrics supported by confusion matrix analysis. The results indicate that the ANN + SMOTE model achieved the highest performance with an accuracy of 93.58%, outperforming ANN (92.59%) and KNN (86.28%). The sentiment distribution indicates that public opinion toward the MBG program is predominantly neutral (52.1%), followed by positive (40.0%) and negative (7.9%) sentiments. These findings suggest that while the MBG program is generally well received, negative sentiments provide important feedback related to program implementation and governance.

Downloads

Download data is not yet available.

References

[1] V. Issue, “Pancasila : Jurnal Keindonesiaan,” vol. 05, no. 1, 2025.

[2] Kementerian Sekretariat Negara and R. Indonesia, “Presiden Prabowo: Target 82 Juta Penerima Manfaat Makan Bergizi Gratis akan Terwujud Bertahap,” 2025. [Online]. Available: https://www.setneg.go.id/baca/index/presiden_prabowo_target_82_juta_penerima_manfaat_makan_bergizi_gratis_akan_terwujud_bertahap

[3] mediakeuangan kemenkeu, “Pemerintah Salurkan Makan Bergizi Gratis (MBG), Ini Sasaran Utama Penerimanya Artikel ini telah tayang di situs Media Keuangan | MK+ dengan judul ‘Pemerintah Salurkan Makan Bergizi Gratis (MBG), Ini Sasaran Utama Penerimanya - Media Keuangan’ Lihat seleng,” 2025. [Online]. Available: https://mediakeuangan.kemenkeu.go.id/article/show/pemerintah-salurkan-makan-bergizi-gratis-mbg-ini-sasaran-utama-penerimanya

[4] Antara News, “Makan Bergizi Gratis capai 38,5 juta penerima jelang akhir 2025”, [Online]. Available: https://www.antaranews.com/berita/5207037/bgn-makan-bergizi-gratis-capai-385-juta-penerima-jelang-akhir-2025

[5] D. González-Fernández, O. Muralidharan, P. A. Neves, and Z. A. Bhutta, “Associations of Maternal Nutritional Status and Supplementation with Fetal, Newborn, and Infant Outcomes in Low-Income and Middle-Income Settings: An Overview of Reviews,” Nov. 01, 2024, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/nu16213725.

[6] E. Kristjansson et al., “School feeding programs for improving the physical and psychological health of school children experiencing socioeconomic disadvantage,” Cochrane Database Syst. Rev., vol. 2022, no. 8, Aug. 2022, doi: 10.1002/14651858.CD014794.

[7] 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, Sep. 2025, doi: 10.52436/1.jpti.931.

[8] A. Ramadhani, I. Permana, M. Afdal, and M. Fronita, “Analisis Sentimen Tanggapan Publik di Twitter Terkait Program Kerja Makan Siang Gratis Prabowo – Gibran Menggunakan Algoritma Naïve Bayes Classifier dan Support Vector Machine,” Build. Informatics, Technol. Sci., vol. 6, no. 3, pp. 1509–1516, Dec. 2024, doi: 10.47065/bits.v6i3.6188.

[9] E. Triningsih, M. Afdal, I. Permana, and N. Evrilyan Rozanda, “Analisis Sentimen Terhadap Program Makan Bergizi Gratis Menggunakan Algoritma Machine Learning Pada Sosial Media X,” Technol. Sci., vol. 6, no. 4, pp. 2240–2250, 2025, doi: 10.47065/bits.v6i4.6534.

[10] G. R. Ati and P. T. Prasetyaningrum, “Analysis of Community Sentiment Towards Free Nutrition Meal Programs on Twitter Using Naïve Bayes, Support Vector Machine, K-Nearest Neighbors, and Ensemble Methods,” J. Inf. Syst. Informatics, vol. 7, no. 2, pp. 1443–1460, Jul. 2025, doi: 10.51519/journalisi.v7i2.1098.

[11] Y. Zaen Vebrian, “A Sentiment Analysis Of Free Meal Plans On Social Media Using Naïve Bayes Algorithms Analisis Sentimen Terhadap Rencana Makan Gratis Di Sosial Media X Menggunakan Alogaritma Naive Bayes,” vol. 10, no. 1, p. 2025.

[12] Y. R. Dewi, N. W. S. Saraswati, M. O. E. Monny, I. B. G. Sarasvananda, and I. G. Andika, “Sentiment Analysis of the Relocation of the National Capital on Social Media X,” Sinkron, vol. 9, no. 2, pp. 625–636, 2025, doi: 10.33395/sinkron.v9i2.14622.

[13] D. T. Attaulah, D. Soyusiawaty, V. No, D. T. Attaulah, and D. Soyusiawaty, “Edumatic : Jurnal Pendidikan Informatika Analisis Sentimen Program Makan Siang Gratis di Twitter / X menggunakan Metode BI-LSTM,” Edumatic J. Pendidik. Inform., vol. 9, no. 1, pp. 294–303, Apr. 2025, doi: 10.29408/edumatic.v9i1.29725.

[14] I. Hermansyah and M. S. Hasibuan, “Sentiment Analysis of Free Nutritious Meal Programme on Social Media X using Linear Regression and Random Forest Algorithms,” vol. 13, no. 225, pp. 49–54, 2026, doi: 10.33558/piksel.v13i1.10633.

[15] Satrio Junaidi, R. Valicia Anggela, and D. Kariman, “Klasifikasi Metode Data Mining untuk Prediksi Kelulusan Tepat Waktu Mahasiswa dengan Algoritma Naïve Bayes, Random Forest, Support Vector Machine (SVM) dan Artificial Neural Nerwork (ANN),” J. Appl. Comput. Sci. Technol., vol. 5, no. 1, pp. 109–119, 2024, doi: 10.52158/jacost.v5i1.489.

[16] Mutiara Sintia Dewi and A. H. Hasugian, “Penerapan Support Vector Machine Untuk Analisis Sentimen Pada Tanggapan Masyarakat Di Media Sosial Terhadap Program Makan Siang Gratis,” Rabit J. Teknol. dan Sist. Inf. Univrab, vol. 10, no. 2, pp. 911–922, Jul. 2025, doi: 10.36341/rabit.v10i2.6425.

[17] A. Mardiana, Z. Abidin, A. Mardiana, and Z. Abidin, “The Influence of User Sentiment Analysis X on the Free Nutritious Food Program Using the K-Nearest Neighbors Method and Logistic Regression Citation: Article History,” Res. Horiz., vol. 5, no. 4, pp. 1655–1668.

[18] J. Muliawan and E. Dazki, “Sentiment Analysis Of Indonesia ’ S Capital City Relocation Using Three Algorithms : Naïve Bayes , Knn , And Random Forest Analisis Sentimen Pemindahan Ibu Kota Negara Indonesia Menggunakan Tiga Algoritma : Naïve Bayes , KNN , Dan Random,” vol. 4, no. 5, pp. 1227–1236, 2023.

[19] T. Astuti and I. Pratika, “Product Review Sentiment Analysis by Artificial Neural Network Algorithm,” vol. 2, no. 2, pp. 61–66, 2019.

[20] H. H. Limbong, “Optimasi Analisis Sentimen Ulasan Aplikasi Amikom One Menggunakan SMOTE pada Algoritma Artificial Neural Network Optimization of Sentiment Analysis for Amikom One Application Reviews Using SMOTE with Artificial Neural Network Algorithm,” vol. 13, pp. 2048–2059, 2024.

[21] R. Afandi, M. Afdal, and R. Novita, “Analisis Sentimen Masyarakat Terhadap Pinjaman Online di Twitter Menggunakan Algoritma Naïve Bayes Classifier dan K-Nearest N eighbor,” vol. 6, no. 2, pp. 596–605, 2024, doi: 10.47065/bits.v6i2.5300.

[22] N. Hendrastuty, A. Rahman Isnain, and A. Yanti Rahmadhani, “Analisis Sentimen Masyarakat Terhadap Program Kartu Prakerja Pada Twitter Dengan Metode Support Vector Machine,” vol. 6, no. 3, 2021, [Online]. Available: http://situs.com

[23] M. K. Anam, B. N. Pikir, M. B. Firdaus, and S. Erlinda, “Penerapan Na ¨ ıve Bayes Classifier , K-Nearest Neighbor ( KNN ) dan Decision Tree untuk Menganalisis Sentimen pada Interaksi Netizen dan Pemeritah Applications of Na ¨ ıve Bayes Classifier , K-Nearest Neighbor and Decision Tree to Analyze Sentiment on Ne,” vol. 21, no. 1, 2021, doi: 10.30812/matrik.v21i1.1092.

[24] D. Haliza and M. Ikhsan, “Sentiment Analysis on Public Perception of the Nusantara Capital on Social Media X Using Support Vector Machine (SVM) and K-Nearest Neighbor (K-NN) Methods,” 2025. [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC

[25] U. Brawijaya, “Pembentukan Daftar Stopword Goffman Transition Point Dengan Pembobotan Emoji Pada Analisis Sentimen Di Twitter Establishment Of Goffman Transition Point Stopword List With Emoji Weighting On Sentiment Analysis In Twitter,” vol. 9, no. 4, pp. 1101–1108, 2022, doi: 10.25126/jtiik.202294706.

[26] M. Bilal, G. Ali, M. W. Iqbal, M. Anwar, M. Sheraz, and A. Malik, “Auto-Prep : Efficient and Automated Data Preprocessing Pipeline,” IEEE Access, vol. 10, no. June, pp. 107764–107784, 2022, doi: 10.1109/ACCESS.2022.3198662.

[27] M. U. Albab, Y. K. P, and M. N. Fawaiq, “Optimization of the Stemming Technique on Text preprocessing President 3 Periods Topic,” vol. 20, no. 2, pp. 1–10, 2023.

[28] A. L. I. Erkan and T. Güngör, “Analysis of Deep Learning Model Combinations and Tokenization Approaches in Sentiment Classification,” no. November, pp. 134951–134968, 2023.

[29] A. Bijaksana and P. Negara, “The Influence Of Applying Stopword Removal And Smote On Indonesian Sentiment Classification,” vol. 14, no. 3, pp. 172–185, 2023.

[30] Z. Abidin, “Text Stemming and Lemmatization of Regional Languages in Indonesia : A Systematic Literature Review,” vol. 10, no. 2, pp. 217–231, 2024.

[31] S. K. Narayanasamy, Y. Hu, and S. M. Qaisar, “Effective Preprocessing and Normalization Techniques for COVID-19 Twitter Streams with POS Tagging via Lightweight Hidden Markov Model,” vol. 2022, 2022, doi: 10.1155/2022/1222692.

[32] N. Eldha Oktaviana and Y. Arum Sari, “Analisis Sentimen Terhadap Kebijakan Kuliah Daring Selama Pandemi Menggunakan Pendekatan Lexicon Based Features Dan Support Vector Machine”, doi: 10.25126/jtiik.202295625.

[33] A. C. Najib, A. Irsyad, G. A. Qandi, and N. Aini, “Perbandingan Metode Lexicon-based dan SVM untuk Analisis Sentimen Berbasis Ontologi pada Kampanye Pilpres Indonesia Tahun 2019 di Twitter Abstrak,” vol. 4, no. 2, 2019.

[34] Y. Asri, W. N. Suliyanti, D. Kuswardani, and M. Fajri, “Pelabelan Otomatis Lexicon Vader dan Klasifikasi Naive Bayes dalam menganalisis sentimen data ulasan PLN Mobile,” vol. 15, no. 2, pp. 264–275, 2022.

[35] D. Pateman, T. F. Prasetyo, H. Sujadi, and U. Majalengka, “Sentiment Analysis Of Government On Tiktok And X,” vol. 10, no. 4, pp. 900–908, 2025, doi: 10.33480/jitk.v10i4.6645.(SVM).

[36] R. Sistem, “Studi Komparatif Metode Ekstraksi Fitur pada Analisis Sentimen,” vol. 1, no. 10, pp. 9–12, 2021.

[37] D. E. Cahyani and I. Patasik, “Performance comparison of TF-IDF and Word2Vec models for emotion text classification,” vol. 10, no. 5, pp. 2780–2788, 2021, doi: 10.11591/eei.v10i5.3157.

[38] A. A. Huda, R. Fajarudin, and A. Hadinegoro, “Sistem Rekomendasi Content-based Filtering Menggunakan TF-IDF Vector Similarity Untuk Rekomendasi Artikel Berita,” vol. 4, no. 3, pp. 1679–1686, 2022, doi: 10.47065/bits.v4i3.2511.

[39] Z. R. Tembusai, H. Mawengkang, M. Zarlis, A. Info, and A. H. Process, “K-Nearest Neighbor with K-Fold Cross Validation and Analytic Hierarchy Process on Data Classification,” vol. 2, no. 1, pp. 1–8, 2021, doi: 10.25008/ijadis.v2i1.1204.

[40] B. H. Hayadi, I. G. I. Sudipa, and A. P. Windarto, “Model peramalan pada peserta KB aktif jalur pemerintahan menggunakan Artificial Neural Network Back-propagation Artificial Neural Network Back-propagation models for active family planning participants in the government pathway,” vol. 21, no. 1, 2021, doi: 10.30812/matrik.v21i1.1273.

[41] S. H. Gulo, A. H. Lubis, T. Informatika, F. Teknik, and U. M. Area, “Penerapan Multi-Layer Perceptron untuk Mengklasifikasi Penduduk Kurang Mampu,” vol. 4, no. 2, pp. 51–59, 2024.

[42] E. Saputra and E. R. Susanto, “Implementation of Deep Learning with Multilayer Perceptron ( MLP ) for Heart Disease Prediction Using the SMOTE-ENN Technique,” vol. 9, no. 3, pp. 1034–1041, 2025.

[43] K. Neighbor et al., “Analisis Sentimen Komentar Konsumen Industri Jamu di Media Sosial menggunakan Artificial Neural Network dan,” J. Sist. Inf. Bisnis, vol. 03, no. 3, pp. 210–223, Aug. 2024, doi: 10.21456/vol14iss3pp210-223.

[44] A. Y. Pratama, G. A. Sanjaya, N. K. Lubis, and M. R. Aditya, “Analisis Sentimen Publik Terkait Danantara Menggunakan Algoritma IndoBERT pada Platform Media Sosial,” 2025, doi: 10.47002/metik.v9i1.1055.

Downloads

Published

2026-02-09

How to Cite

[1]
F. A. Hakim, I. W. D. Prastya, and J. R. Budiani, “Sentiment Analysis of the Free Nutritious Meal Program (MBG) on Social Media X (Twitter) Using K-Nearest Neighbor and Artificial Neural Network”, JAIC, vol. 10, no. 1, pp. 865–876, Feb. 2026.

Similar Articles

<< < 5 6 7 8 9 > >> 

You may also start an advanced similarity search for this article.