bit-Tech
Vol. 8 No. 2 (2025): bit-Tech

Sentiment Analysis of YouTube Comments on Free Lunch Program Using Machine Learning

Bagus Satrio Pringgodani (Stikubank University)
Aji Supriyanto (Stikubank University)



Article Info

Publish Date
10 Dec 2025

Abstract

In the digital era, social media has become a primary platform for the public to express opinions, including reactions to governmental initiatives such as Indonesia's "Free Lunch" program. This study aims to systematically analyze public sentiment toward the program by leveraging YouTube comment data, providing a data-driven perspective on public perception. Comment data were automatically retrieved using the YouTube Data API v3 and underwent comprehensive text preprocessing, including data cleaning, case folding, normalization, stopword removal, and stemming. The preprocessed text data were classified into positive, negative, and neutral sentiments using two machine learning algorithms: K-Nearest Neighbor (KNN) and Naïve Bayes. Algorithm performance was systematically evaluated using a confusion matrix and standard classification metrics such as accuracy, precision, recall, and F1-score. Experimental results demonstrated that the Naïve Bayes classifier achieved higher precision (66%), recall (66%), and accuracy (66%), outperforming KNN in classifying sentiments within imbalanced datasets. Conversely, KNN showed more stable yet lower accuracy (39%) performance when sentiment distribution was relatively balanced. This study highlights the importance of thorough preprocessing and careful algorithm selection to improve sentiment classification accuracy from informal, user-generated content, especially within the Indonesian language context. The findings provide critical insights for policymakers, emphasizing the value of machine learning as a robust, empirical approach to evaluating public opinion.

Copyrights © 2025






Journal Info

Abbrev

bt

Publisher

Subject

Computer Science & IT

Description

The bit-Tech journal was developed with the aim of accommodating the scientific work of Lecturers and Students, both the results of scientific papers and research in the form of literature study results. It is hoped that this journal will increase the knowledge and exchange of scientific ...