Sentiment Analysis of Public Comments on YouTube Content Using Principal Component Analysis and Naive Bayes - Dede Pratama; Sumijan Sumijan; Rini Sovia (Sebatik, 2026)
The rapid acceleration of digital media development compels public broadcasting institutions to adapt to shifting public information consumption patterns, which are now centered on online platforms. TVRI Sumatera Barat has responded to these dynamics by leveraging YouTube as a channel for content distribution and audience engagement. However, this interaction generates a massive volume of unstructured comment text, rendering manual sentiment analysis inefficient, time-consuming, and prone to subjectivity. This study aims to address these challenges by automatically and objectively classifying user sentiment using a machine learning approach. The applied methodology integrates Principal Component Analysis (PCA) and the Gaussian Naive Bayes algorithm. PCA serves as a dimensionality reduction technique to simplify TF-IDF weighted text features without losing vital information, while Gaussian Naive Bayes was selected for classification due to its efficiency in rapidly processing the continuous numerical data resulting from the PCA transformation. The research dataset comprises 10 comments from the TVRI Sumatera Barat YouTube channel in 2024, collected via the YouTube Data API, which underwent preprocessing and labeling for positive and negative sentiments. Model validation was conducted using a confusion matrix with accuracy, precision, recall, and F1-score metrics. The test results demonstrate that the combination of PCA and Gaussian Naive Bayes effectively enhances computational efficiency and delivers precise classification performance. This research makes a significant contribution by providing a measurable method for public opinion analysis, which is essential as a basis for evaluating audience perception to improve the quality of digital broadcasting strategies in public institutions.