Building of Informatics, Technology and Science
Vol 8 No 1 (2026): June 2026

Klasifikasi Sentimen Program Makan Bergizi Gratis di Platform X dengan TF-IDF dan Class-Weighted LinearSVC

Muhammad Syihabuddin Musyaffa (Universitas Dian Nuswantoro, Semarang)
Novita Kurnia Ningrum (Universitas Dian Nuswantoro, Semarang)



Article Info

Publish Date
30 Jun 2026

Abstract

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.

Copyrights © 2026






Journal Info

Abbrev

bits

Publisher

Subject

Computer Science & IT

Description

Building of Informatics, Technology and Science (BITS) is an open access media in publishing scientific articles that contain the results of research in information technology and computers. Paper that enters this journal will be checked for plagiarism and peer-rewiew first to maintain its quality. ...