ENHANCING SENTIMENT ANALYSIS OF THE 2024 INDONESIAN PRESIDENTIAL INAUGURATION ON X USING SMOTE-OPTIMIZED NAIVE BAYES CLASSIFIER - Afuan, Lasmedi; Khanza, Muthia; Zahira Hasyati, Adila (Jurnal Teknik Informatika (Jutif), 2025)
The inauguration of the President and Vice President of Indonesia for the 2024-2029 period has drawn significant public attention, reflecting widespread political and societal interest. This study aims to optimize sentiment analysis of public opinion on X (formerly Twitter) regarding the inauguration by enhancing the Naïve Bayes Classifier (NBC) with the Synthetic Minority Over-sampling Technique (SMOTE). Addressing the issue of class imbalance in sentiment data, the research demonstrates how SMOTE improves classification robustness. The methodology includes data crawling from X, preprocessing involving tokenization, stemming, and TF-IDF feature extraction, and sentiment labeling using TextBlob. Sentiment classification is conducted with NBC, evaluated under conditions with and without SMOTE. Metrics such as accuracy, precision, recall, and F1-score are utilized to assess performance. Results indicate that the application of SMOTE increases the accuracy of NBC from 98% to 99%, with precision improving from 0.98 to 1 and recall maintaining high levels (0.99). This 1% accuracy enhancement underscores the significance of addressing class imbalance for reliable sentiment analysis. The findings contribute to a better understanding of public sentiment during critical political events and highlight the effectiveness of SMOTE in improving text classification tasks. This research provides valuable insights into leveraging machine learning techniques for analyzing imbalanced datasets, offering implications for both academic and practical applications in sentiment analysis and political studies.