OPINI PUBLIK TERHADAP ULASAN VIDEO RUU TNI MENGGUNAKAN TF-IDF, NAÏVE BAYES DAN SMOTE - Patrisius Satria Hendrawan; Michael Gunawan; Hafiz Irsyad; Abdul Rahman (Jurnal Teknologi Informasi dan Komputer, 2026)
The rapid development of digital technology has encouraged the public to actively express their opinions on public issues through social media platforms, including YouTube. The comment section on videos discussing the Draft Law on the Indonesian National Armed Forces (RUU TNI) has become a space for the public to convey support or rejection. This study aims to analyze public opinion regarding the RUU TNI by classifying YouTube comments into two sentiment categories: positive and negative. The methods employed include text preprocessing, feature extraction using TF-IDF, sentiment classification with the Naïve Bayes algorithm, and data balancing using the SMOTE technique to address class imbalance. The evaluation results show that the model achieved 80.7% accuracy before SMOTE; however, the recall and f1-score for the positive class were very low due to the imbalanced dataset. After applying SMOTE, the accuracy slightly decreased to 80.38%, but there was a significant improvement in the evaluation metrics for the positive class, with recall reaching 86.21% and f1-score 81.3%. WordCloud visualization also revealed dominant keywords that represent each sentiment. These findings indicate that the Naïve Bayes algorithm, when combined with SMOTE, is more effective in producing a balanced sentiment classification and is recommended for use in analyzing imbalanced textual data related to public opinion.