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

Read full text
Authors: Fernanda Amri Hakim, Ifnu Wisma Dwi Prastya, Jauhara Rana Budiani
Cited by: 1

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.

Fields of Study & Subjects

Sentiment Analysis and Opinion Mining Edcuational Technology Systems Public Health and Nutrition

Publication details

Journal / source
Journal of Applied Informatics and Computing
Publisher
Politeknik Negeri Batam
Volume
10
Issue
1
Pages
865–876
Publication date
9 February 2026
Language
ID