Evaluasi Komparatif Algoritma Machine Learning dalam Analisis Sentimen Program Makan Bergizi Gratis di Media Sosial X - Angelina Putri Ariani; Norhikmah; Yoga Pristyanto (Universitas Budi Darma, 2026)
The analysis of public opinion on social media platforms through sentiment analysis plays a crucial role in understanding how the public responds to government policies, including the Free Nutritious Meal Program (MBG). However, the imbalanced nature of social media data and the use of informal language such as sarcasm pose challenges in the sentiment classification process. Therefore, this study aims to examine public perceptions of the MBG program on platform X while also evaluating the effectiveness of several machine learning algorithms in categorizing sentiment. The dataset used in this study consists of 2,000 comments collected between February and April 2026. The data were labeled using a lexicon-based approach and processed through preprocessing and feature extraction using TF-IDF. The classification process was carried out using six algorithms: Naïve Bayes, K-Nearest Neighbor (K-NN), Support Vector Machine (SVM), Decision Tree, Random Forest, and Logistic Regression. The results show that Random Forest achieved the highest accuracy, reaching 92%, supported by a cross-validation score of 89%, indicating strong model stability. Based on the classification results, public sentiment is predominantly neutral at 66.3%, followed by negative sentiment at 22.6% and positive sentiment at 11.1%. These findings suggest that public opinion toward the MBG program tends to be neutral, with a stronger inclination toward criticism than support. Furthermore, the results highlight the importance of selecting appropriate algorithms to improve the accuracy of sentiment analysis on complex and imbalanced textual data