ANALISIS SENTIMEN PROGRAM MAKAN GRATIS PADA PLATFORM X MENGGUNAKAN AGORITMA NAÏVE BAYES - Laia , Metodius Modianus; Hasan, Fuad Nur; Kuntoro, Antonius Yadi (LPPM Universitas Putera Batam, 2025)
The Free Meal Program is one of the government’s strategic policies that has received various public responses, especially on social media Platform X (formerly Twitter). This study aims to analyze the level of public sentiment toward the Free Meal Program on Platform X. The classification method used is the Naïve Bayes algorithm, with model validation performed using the K-Fold Cross Validation technique. A total of 3,600 Indonesian-language tweets relevant to the Free Meal Program were collected through a web scraping process, followed by text preprocessing steps such as case folding, cleaning, tokenizing, stopword removal, and stemming. Data labeling was carried out semi-automatically using the IndoBERT model, and the tweets were then classified into two sentiment categories: positive and negative. The Naïve Bayes model was trained using the TF-IDF representation and tested on a test set comprising 20% of the total dataset. The evaluation results showed that the Naïve Bayes algorithm achieved an accuracy of 86.46%, precision of 86.55%, recall of 95.25%, and an F1-score of 90.77% on 458 test tweets. Validation using 10-fold cross-validation yielded an average accuracy of 86.74%. These results indicate that the Naïve Bayes algorithm demonstrates good classification performance and stable generalization in classifying public sentiment regarding the Free Meal Program. This research is expected to serve as a supporting tool in mapping public opinion based on social media