Klasifikasi Sentimen Program Makan Bergizi Gratis di Platform X dengan TF-IDF dan Class-Weighted LinearSVC - Muhammad Syihabuddin Musyaffa; Novita Kurnia Ningrum (Forum Kerjasama Pendidikan Tinggi, 2026)
This study investigates the optimization of public sentiment classification related to the Free Nutritious Meal Program on Platform X by focusing on social media data that are brief, informal, noisy, and class-imbalanced. The data were collected through scraping from January 5, 2025, to February 26, 2026, producing 7,659 initial posts. After selection, preprocessing, cleaning, and labeling, 5,307 texts were used as the modeling dataset, consisting of 2,183 positive, 2,391 neutral, and 733 negative sentiments. The texts were transformed into numerical features using Term Frequency-Inverse Document Frequency with 5,000 features and unigram-bigram settings. This study evaluated Multinomial Naive Bayes, Logistic Regression, LinearSVC, and Random Forest as comparison models. Optimization was performed using GridSearchCV, while class_weight balanced was applied to improve the model’s ability to identify the smaller negative class. The evaluation results show that LinearSVC with class_weight balanced produced the most balanced performance, with an accuracy of 0.9011, macro F1-score of 0.8989, weighted F1-score of 0.9011, negative recall of 0.8367, and negative F1-score of 0.8913. The contribution of this study lies in emphasizing minority-class evaluation through negative recall and F1-score, making the model a preliminary component for digital public opinion monitoring that is more sensitive to criticism and complaints.