Campaigns significantly influence candidate electability. Presidential debates, a key campaign strategy, generate extensive public comments on social media, reflecting voter sentiment. This study employs VADER for automated sentiment labeling and Naïve Bayes for classification, analyzing comments from the KPU and Najwa Shihab YouTube channels. Electability data were sourced from national survey reports for correlation analysis. Pearson correlation results indicate that positive sentiment has a moderate negative correlation with electability, while negative sentiment shows a strong positive correlation. This suggests that negative sentiment in YouTube comments is more indicative of a candidate’s rising electability, whereas positive sentiment does not necessarily translate into increased support. The Naïve Bayes model achieved 65% accuracy, 59% precision, 57% recall, and 57% F1-score when including neutral comments. Excluding neutral comments improved accuracy to 77%, with 68% precision, 68% recall, and 67% F1-score. The dataset comprised 17,872 comments, ensuring a robust sample. Despite these findings, limitations exist, such as potential biases in sentiment classification and representativeness, as social media users may not fully reflect the general voting population. Furthermore, while correlation is established, causality remains uncertain, requiring further research. This study enhances the understanding of social media sentiment in political campaigns and highlights the importance of integrating online sentiment analysis with traditional polling methods for a comprehensive assessment of electability.
Copyrights © 2025