Bunga Nurul Manisa
Universitas Islam Negeri Sumatera Utara, Medan

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Klasifikasi Persepsi Publik Terhadap Perang Dagang Amerika Serikat Menggunakan Algoritma Naïve Bayes Classifier Bunga Nurul Manisa; Aidil Halim Lubis
Bulletin of Computer Science Research Vol. 6 No. 4 (2026): June 2026
Publisher : Forum Kerjasama Pendidikan Tinggi (FKPT)

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.47065/bulletincsr.v6i4.1112

Abstract

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.