Comparative Analysis of Machine Learning and IndoBERT Models for Sentiment Analysis of YouTube Comments on the Free Nutritious Meals Program - Irvan Theo Shandy; Ucta Pradema Sanjaya (Journal of Applied Informatics and Computing, 2026)
The Free Nutritious Meals Program has become one of the most widely discussed public policies in Indonesia and has generated various public responses on social media, particularly YouTube. Public comments on YouTube can be utilized as a valuable data source to understand public sentiment toward the implementation of the program. Therefore, this study aims to analyze and compare the performance of several classification algorithms in sentiment analysis of YouTube comments related to the Free Nutritious Meals Program. The dataset used in this study was obtained through a crawling process on one of Raymond Chin’s YouTube videos discussing the MBG program. A total of 903 comments were collected, and after the preprocessing stage, 401 comments were selected for further analysis. The preprocessing steps included cleaning, normalization, tokenization, stopword removal, and stemming. Furthermore, the text data were transformed using the TF-IDF weighting method. This study compared several classification algorithms, namely Random Forest, Gradient Boosting, Support Vector Machine (SVM), XGBoost, Multinomial Naïve Bayes, IndoBERT, and LightGBM. Model evaluation was conducted using confusion matrix analysis and performance metrics consisting of accuracy, precision, recall, and F1-score. The experimental results show that the Random Forest algorithm achieved the best performance with an accuracy of 0.9672, precision of 0.9683, recall of 0.9672, and F1-score of 0.9620. However, the confusion matrix analysis indicates that the model tends to be biased toward the positive sentiment class due to the imbalance in sentiment distribution within the dataset. In addition, the relatively small dataset and the use of comments from a single YouTube source may affect the generalization of the model results. Based on these findings, Random Forest can be considered the most effective algorithm for sentiment classification in this study. The results of this research are expected to provide insights into public perceptions regarding the MBG program and serve as evaluation material for policymakers in improving the implementation of public nutrition programs in Indonesia.