Klasifikasi Persepsi Publik Terhadap Perang Dagang Amerika Serikat Menggunakan Algoritma Naïve Bayes Classifier - Bunga Nurul Manisa; Aidil Halim Lubis (Forum Kerjasama Pendidikan Tinggi (FKPT), 2026)
The import tariff policy implemented by the President of the United States on April 2, 2025 triggered tensions in global trade and provoked various public reactions. Differences in public perceptions of the policy generated diverse opinions, including support, criticism, and neutral responses, making sentiment analysis necessary to understand public opinion trends more systematically. This study aims to classify public perceptions of the U.S. trade war through sentiment analysis of Twitter data using the Naïve Bayes Classifier (NBC) algorithm. The dataset consists of 2,000 tweets collected using the keywords “trade war” and “import tariff increase” during April 3–30, 2025. Six preprocessing stages were applied: cleaning, case folding, tokenizing, slangword normalization, stopword removal, and stemming to improve data quality and consistency. Automatic labeling was conducted using a lexicon-based method with the InSet dictionary, yielding sentiment distributions of 83.5% negative, 12.8% positive, and 3.8% neutral. Feature representation was performed using TF-IDF, followed by an 80:20 train-test split. To address class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. Experimental results show that the NBC model without SMOTE achieved an accuracy of 83.5% but exhibited bias toward the majority class. After applying SMOTE, the dataset became balanced with 1,335 samples per class. Although overall accuracy decreased to 76%, the Macro F1-Score improved from 0.30 to 0.45, indicating improved model performance in handling multi-class classification more fairly. Additionally, the model achieved a recall of 43% for the positive class and 13% for the neutral class, providing a more representative evaluation of public sentiment toward the U.S. trade war issue.