Analysis of Public Sentiment on Election Results using Naïve Bayes in Social Media X - Muliana, Ahmad Syakir; Lestarini, Dinda; Raflesia, Sarifah Putri (Program Studi Sistem Informasi Fakultas Teknik dan Ilmu Komputer, 2024)
The objective of the research is to examine the public opinion regarding the 2024 Indonesian election results by applying Naïve Bayes to social media data obtained from platform X of Twitter. A dataset comprising 2,500 election-related tweets was obtained by web scraping and then subjected to tokenization, stopword elimination, stemming, and TF-IDF weighting for preprocessing. The application of the Synthetic Minority Oversampling Technique (SMOTE) was attempted to mitigate class imbalance. The performance of the Naïve Bayes model was assessed using Stratified K-Fold Cross-Validation. The model achieved an average accuracy of 66.90% on the test set and 80% during cross-validation. The results demonstrate successful categorization of positive sentiment, although the model encountered difficulties in precisely detection of negative and neutral sentiments. The results underscore significant consequences for policymakers and political parties in formulating effective communication strategies. Further study is advised to investigate sophisticated algorithms to improve the accuracy of sentiment classification, namely in detecting neutral sentiments.