Performance Comparison of 10 Machine Learning Algorithms in Sentiment Classification on Platform X Regarding the Government’s Priority Program: Makanan Bergizi Gratis (MBG) - Deni Utama; Rauhil Fahmi; Muhammad Ridho Kurniawan Pratama (Center for Research and Community Service, Institut Informatika Indonesia (IKADO) Surabaya, 2025)
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.