Muhamad Kurniawan
Universitas Pertiba

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

ANALISIS SENTIMEN PROGRAM MAKAN BERGIZI GRATIS DI MEDIA SOSIAL X MENGGUNAKAN TF-IDF DAN PERBANDINGAN ALGORITMA MACHINE LEARNING Weliansyah Weliansyah; Muhamad Kurniawan
RJOCS (Riau Journal of Computer Science) Vol. 12 No. 2 (2026): RJOCS (Riau Journal of Computer Science)
Publisher : Fakultas Ilmu Komputer, Universitas Pasir Pengaraian

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.30606/rjocs.v12i2.4838

Abstract

The Free Nutritional Meal Program (MBG) is a government policy that has generated various public responses on social media X. The large volume of opinions generated makes sentiment analysis an effective approach to automatically identify public perception. This study aims to analyze public sentiment towards the Free Nutritional Meal Program and compare the performance of the Naive Bayes, Logistic Regression, and Support Vector Machine (SVM) algorithms in classifying sentiment. The study uses a quantitative approach based on Natural Language Processing (NLP) with stages of data collection, preprocessing, sentiment labeling using a lexicon approach, feature extraction using Term Frequency–Inverse Document Frequency (TF-IDF), data division using Stratified Train-Test Split, validation using Stratified K-Fold Cross Validation, parameter optimization through GridSearchCV, and model evaluation using Accuracy, Precision, Recall, F1-Score, Confusion Matrix, and ROC Curve. The results show that the crawling process produced 2,798 tweets, then after preprocessing obtained 2,703 tweets used in the classification process. The sentiment distribution shows a predominance of positive sentiment towards the Free Nutritional Meal Program. All algorithms performed well in classification after parameter optimization. Based on the evaluation results, Logistic Regression performed best, followed by Support Vector Machine, while Naive Bayes yielded competitive results as a comparison model. This study demonstrates that the combination of preprocessing, lexicon-based labeling, TF-IDF feature extraction, and model optimization produces effective sentiment classification and can be utilized to support data-driven public policy evaluation.