Klasifikasi Persepsi Publik Terhadap Perang Dagang Amerika Serikat Menggunakan Algoritma Naïve Bayes Classifier
DOI:
https://doi.org/10.47065/bulletincsr.v6i4.1112Keywords:
Naïve Bayes Classifier; Sentiment Analysis; Trade War; SMOTE; TF-IDFAbstract
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.
Downloads
References
A. Rahman, F. Rahmat, M. Y. Fariqi, S. Adi, and P. S. Informatika, “Metode Naive Bayes untuk Menganalisis Akurasi Sentimen Komentar di Youtube,” J. EECCIS, vol. 14, no. 1, pp. 31–34, 2020, [Online]. Available: http://bit.ly/2u802Pe
B. Syabani Sabrawera and Farid Hirji Badruzzaman, “Peran Jaringan Bisnis dalam Upaya Pengembangan Usaha (Studi Kasus pada Moriska Baby),” JEMSI (Jurnal Ekon. Manajemen, dan Akuntansi), vol. 10, no. 4, pp. 2413–2423, 2024, doi: 10.35870/jemsi.v10i4.2621.
Y. Ariyani and D. H. Perkasa, “Bagaimana Kecerdasan Budaya Memengaruhi Keterikatan Kerja dan Retensi Karyawan dalam Tim Multikultural: Literature Review,” J. Ekon. Manaj. Sist. Inf., vol. 6, no. 3, pp. 1411–1422, 2025, doi: 10.38035/jemsi.v6i3.3663.
M. Andriana and T. Sumarlin, “Analsis Sistem Informasi Anggaran,” J. Manaj. Sos. Ekon., vol. 3, no. 2, pp. 158–163, 2023.
R. Rahmatulloh, M. Iqbal Ibrahim, M. R. Handayani`, K. Umam, and N. C. H. Wibowo, “Model Klasifikasi Naive Bayes untuk Pemetaan Persepsi Publik Secara Real-Time pada Media Sosial: Studi Kasus RUU TNI 2025,” Decod. J. Pendidik. Teknol. Inf., vol. 5, no. 2, pp. 365–379, 2025, [Online]. Available: https://journal.umkendari.ac.id/decode/article/view/1139
T. I. Solihati, N. Hidayanti, and R. Kania, “Implementasi Data Mining Evaluasi Kinerja Penelitian Mahasiswa Dengan Menggunakan Algoritma Naive Bayes,” J. Theorems (The Orig. Reasearch …, vol. 6, no. 2, pp. 135–147, 2022.
T. Setiadi, F. Noviyanto, H. Hardianto, A. Tarmuji, A. Fadlil, and M. Wibowo, “Implementation of naïve bayes method in food crops planting recommendation,” Int. J. Sci. Technol. Res., vol. 9, no. 2, pp. 4750–4755, 2020.
A. Pebdika, R. Herdiana, and D. Solihudin, “Klasifikasi Menggunakan Metode Naive Bayes Untuk Menentukan Calon Penerima Pip,” JATI (Jurnal Mhs. Tek. Inform., vol. 7, no. 1, pp. 452–458, 2023, doi: 10.36040/jati.v7i1.6303.
M. K. Insan, U. Hayati, and O. Nurdiawan, “Analisis Sentimen Aplikasi Brimo Pada Ulasan Pengguna Di Google Play Menggunakan Algoritma Naive Bayes,” J. Mhs. Tek. Inform., vol. 7, no. 1, pp. 478–483, 2023.
A. Misbachudin Riyadi, H. Sibyan, I. Ahmad Ihsanuddin, and M. Alif Muwafiq Baihaqi, “Klasifikasi Penerima Beasiswa Menggunakan Metode Naïve Bayes (Studi Kasus SMP Negeri 3 Selomerto),” J. Eng. Inform., vol. 1, no. 2, pp. 53–59, 2023, doi: 10.56854/jei.v1i2.61.
Heliyanti Susana, “Penerapan Model Klasifikasi Metode Naive Bayes Terhadap Penggunaan Akses Internet,” J. Ris. Sist. Inf. dan Teknol. Inf., vol. 4, no. 1, pp. 1–8, 2022, doi: 10.52005/jursistekni.v4i1.96.
K. S. Putri, I. R. Setiawan, and A. Pambudi, “Analisis Sentimen Terhadap Brand Skincare Lokal Menggunakan Naïve Bayes Classifier,” Technol. J. Ilm., vol. 14, no. 3, p. 227, 2023, doi: 10.31602/tji.v14i3.11259.
B. F. Haikal et al., “Perbandingan Algoritma Naïve Bayes Dan Dempster Shafer Untuk Diagnosis Penyakit ISPA,” vol. 04, no. 3, pp. 147–157, 2025.
M. A. Mokoagow and A. S. Purnomo, “Penerapan Metode Naïve Bayes Pada Sistem Pakar Untuk Mendiagnosis Penyakit Ibu Hamil,” vol. 4, no. 2, 2024.
J. Kecerdasan and T. Informasi, “Sistem Pakar Diagnosis Penyakit Ispa Menggunakan Metode Naïve Expert System Diagnosis Of Ari Disease Using Naive Bayes Method Based On Web Based Puskesmas Teratak,” vol. 2, no. 1, pp. 32–42, 2023.
M. A. Maghriby and H. Irawan, “Analisis Persepsi Publik Mengenai Resesi Ekonomi Global 2023 Sektor Bisnis di Media Sosial Twitter Menggunakan Algoritma Naïve Bayes dan Topic Modelling,” Widya Cipta J. Sekr. dan Manaj., vol. 7, no. 2, pp. 74–85, 2023, doi: 10.31294/widyacipta.v7i2.15577.
E. Sri Palupi, “Klasifikasi Sentimen Netizen Di Media Sosial X Terhadap Ancaman Resesi Ekonomi Indonesia Dengan Menggunakan Algoritma Naïve Bayes,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 5, pp. 8058–8064, 2025, doi: 10.36040/jati.v9i5.14878.
M. Khanna, M. Kulshrestha, L. K. Singh, S. Thawkar, and K. Shrivastava, “Performance Evaluation of Machine Learning Algorithms for Stock Price and Stock Index Movement Prediction Using Trend Deterministic Data Prediction,” Int. J. Appl. Metaheuristic Comput., vol. 13, no. 1, pp. 1–30, 2022, doi: 10.4018/ijamc.292511.
N. Nazifah, “Analisis Perbandingan Decision Tree Algoritma C4.5 dengan algoritma lainnya: Sistematic Literature Review,” J. Inform. dan Teknol. Komput. ( J-ICOM), vol. 4, no. 2, pp. 57–64, 2023, doi: 10.55377/j-icom.v4i2.7719.
D. Suryani, A. Yulianti, E. L. Maghfiroh, and ..., “Quality Classification of Palm Oil Products Using Naïve Bayes Method,” Sist. J. Sist. …, 2021.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Klasifikasi Persepsi Publik Terhadap Perang Dagang Amerika Serikat Menggunakan Algoritma Naïve Bayes Classifier
ARTICLE HISTORY
How to Cite
Issue
Section
Copyright (c) 2026 Bunga Nurul Manisa, Aidil Halim Lubis

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).













