The advancement of digital technology has increased public engagement in expressing opinions and responding to issues on social media platforms such as X and YouTube. A prominent topic of recent public debate concerns Danantara's management of state-owned banks. This study analyzes public sentiment regarding this issue by comparing the performance of the Naïve Bayes and Random Forest classification methods. A dataset comprising 25,565 entries was collected from both platforms between January 2025 and May 2025. The data underwent text pre-processing, labeling with the InSet Lexicon, and feature weighting using term frequency-inverse document frequency (TF-IDF). The dataset was split at 80:20, and class imbalance was addressed using the Synthetic Minority Over-sampling Technique (SMOTE) prior to classification. Model performance was evaluated using accuracy, precision, recall, and F1-score metrics. The results demonstrate that Random Forest performed stably, achieving 84% accuracy both before and after sampling. In contrast, Naïve Bayes achieved 74% accuracy before sampling, which increased to 79% after sampling. These findings suggest that Random Forest is more robust to data imbalance than Naïve Bayes, which is more susceptible to bias toward the majority class.
Copyrights © 2025