Sentiment Analysis for Political Debates on YouTube Comments using BERT Labeling, Random Oversampling, and Multinomial Naïve Bayes - Apriandy Angdresey; Lanny Sitanayah; Ignatius Lucky Henokh Tangka (Journal of Computing Theories and Applications, 2025)
The 2024 Indonesian Presidential Election marked the fifth general election in the country, aimed at electing a new President and Vice President for the 2024–2029 term. Candidates competed to succeed the outgoing president, who had served two constitutional terms. A key aspect of this election was the candidate debates, where each candidate presented their vision, allowing the public to assess their policies. These debates were broadcast on platforms like YouTube, giving the public a space to comment. However, analyzing YouTube comments presents challenges due to the volume of data, language diversity, and informal expressions. Sentiment analysis, crucial for understanding public opinion, uses algorithms such as Naïve Bayes, which is based on Bayes' Theorem and assumes feature independence. Naïve Bayes is widely used in text analysis for its speed and simplicity. When applied to YouTube comments from the 2024 debates, the algorithm demonstrated its effectiveness, especially with a balanced dataset through random oversampling. It achieved 85.155% accuracy, high precision, recall, and an AUC of 96.8% on an 80:20 data split. Its fast classification time (0.000998 seconds) makes it suitable for real-time sentiment analysis, validating its use for political events. Future applications may incorporate advanced techniques like BERT for more sophisticated analysis.