Skip to content
Open access

Sentiment Analysis of Political Debates on YouTube: Comparative Performance of Naive Bayes and Logistic Regression

Oct 2026 · Indonesian Journal of Computing, Engineering and Design (IJoCED) · 0 citations · 28 references

Abstract

The 2024 Indonesian Presidential Election aimed at electing the President and Vice President for the 2024-2029 term. Central to this election were candidate debates, critical moments for presenting their visions and enabling public evaluation. These debates, accessible on platforms such as YouTube, facilitate public commentary and form the basis for sentiment analysis. However, analyzing YouTube comments presents challenges due to the volume of data, language diversity, and varied expressions. Sentiment analysis, essential for gauging public opinion of political figures, uses algorithms such as Naive Bayes and Logistic Regression. While Naive Bayes assumes feature independence, facilitating rapid implementation in text analysis, Logistic Regression is a discriminative model that captures feature dependencies, allowing it to assign specific weights to words or phrases that strongly signal positive or negative political sentiment. Applied to YouTube comments on the 2024 Indonesian Presidential debates, Logistic Regression demonstrated superior performance with an average accuracy of 90.57% on the aggregated dataset of five debates, outperforming Naive Bayes, which achieved 85.24% using a standard 80:20 train-test split. These findings validate the use of Naive Bayes and Logistic Regression for sentiment analysis during significant political events, confirming the efficacy of integrating advanced transformer models for automated data labeling with classical classifiers for robust, real-time political sentiment analysis.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.