Klasifikasi Perilaku Konsumen Pasca Boikot Produk Israel Menggunakan Naive Bayes dan SVM

Wildan Mauli Darojat(1),Herbert Siregar(2*),Rasim Rasim(3),Munir Munir(4)
(1) Universitas Pendidikan Indonesia
(2) Universitas Pendidikan Indonesia
(3) Universitas Pendidikan Indonesia
(4) Universitas Pendidikan Indonesia
(*) Corresponding Author
DOI : 10.35889/jutisi.v15i1.3429

Abstract

The ongoing Israel–Palestine conflict has contributed to the rise of consumer boycott movements directed at products associated with Israel. These reactions are prominently articulated on social media platforms and indicate changing patterns in consumer attitudes and behavior. This research seeks to analyze and classify public sentiment in Indonesia regarding the boycott issue by employing Natural Language Processing (NLP) techniques in combination with Machine Learning methods, specifically Naïve Bayes and Support Vector Machine (SVM). The dataset comprises user-generated comments obtained from TikTok and Instagram between October 2023 and September 2024 through web scraping procedures. The data were subsequently subjected to manual annotation, text preprocessing, and feature extraction using the TF-IDF weighting scheme. The dataset was partitioned into 80% training data and 20% testing data, and model performance was assessed using accuracy, precision, recall, and F1-score metrics. Experimental results indicate that the SVM model outperformed Naïve Bayes on the training set, achieving an accuracy of 81% and demonstrating stronger generalization in detecting positive sentiment. In contrast, the Naïve Bayes classifier attained an accuracy of 78%, showing consistent performance and superior capability in identifying negative sentiment. These results underscore the significance of selecting classification algorithms that are well suited to the distributional characteristics of sentiment data derived from social media.

Keywords: Text Classification; Support Vector Machine; Naïve Bayes; Boycott; Consumer Behavior

Abstrak

Konflik Israel–Palestina yang terus berlangsung telah mendorong munculnya gerakan boikot konsumen terhadap produk-produk yang memiliki keterkaitan dengan Israel. Respons tersebut banyak diekspresikan melalui platform media sosial dan mencerminkan perubahan pola sikap serta perilaku konsumen. Penelitian ini bertujuan untuk menganalisis dan mengklasifikasikan sentimen masyarakat Indonesia terhadap isu boikot tersebut dengan menerapkan teknik Natural Language Processing (NLP) yang dikombinasikan dengan metode Machine Learning (ML), yaitu Naïve Bayes dan Support Vector Machine (SVM). Dataset penelitian terdiri atas komentar pengguna yang dikumpulkan dari platform TikTok dan Instagram selama periode Oktober 2023 hingga September 2024 melalui teknik web scraping. Data selanjutnya melalui proses anotasi manual, praproses teks, serta ekstraksi fitur menggunakan skema pembobotan TF-IDF. Dataset dibagi menjadi 80% data latih dan 20% data uji, dengan kinerja model dievaluasi menggunakan metrik accuracy, precision, recall, dan F1-score. Hasil eksperimen menunjukkan bahwa model SVM menghasilkan performa yang lebih unggul pada data latih dengan tingkat akurasi sebesar 81% serta memiliki kemampuan generalisasi yang lebih baik dalam mendeteksi sentimen positif. Sementara itu, algoritma Naïve Bayes mencapai akurasi sebesar 78% dan menunjukkan kinerja yang konsisten serta lebih efektif dalam mengidentifikasi sentimen negatif. Temuan ini menegaskan pentingnya pemilihan algoritma klasifikasi yang sesuai dengan karakteristik distribusi data sentimen yang bersumber dari media sosial.

 

Keywords


Klasifikasi Teks; Support Vector Machine; Naïve Bayes; Boikot; Perilaku Konsumen

References


P. Goyal dan P. Soni, “Beyond borders: investigating the impact of the 2023 Israeli–Palestinian conflict on global equity markets,” Journal of Economic Studies, vol. 51, no. 8, pp. 1714–1731, 2024.

W. Jia dan A. A. M. Hassan, “Navigating the crossroads: Analyzing China’s Middle East policy in the Palestinian-Israeli conflict context,” Contemporary Review of the Middle East, vol. 12, no. 1, pp. 10–28, 2025.

F. R. Widyrianto, “Upaya Diplomasi Indonesia dalam merespon Agresi Israel di Gaza Pada Tahun 2023-2024,” Universitas Islam Indonesia, 2025.

H. F. Aked, Friends of Israel: The backlash against Palestine solidarity. Verso Books, 2023.

Y. A. Adi, A. F. Adi, dan M. T. Bahri, “# Boycott as a Social Movement: Evidence from the X Platform.,” Observatorio (OBS*), vol. 19, no. 1, pp. 10–28 2025.

K. Du, F. Xing, R. Mao, dan E. Cambria, “Financial sentiment analysis: Techniques and applications,” ACM Comput. Surv., vol. 56, no. 9, pp. 1–42, 2024.

Y. Liu, F. Han, L. Meng, J. Lai, dan X. Gao, “Textual sentiment classification in tourism research: between manual computing model and machine learning,” Current Issues in Tourism, pp. 1–22, 2025.

L. S. Riza dkk., “Comparison of Machine Learning Algorithms for Species Family Classification using DNA Barcode.,” Knowl. Eng. Data Sci., vol. 6, no. 2, pp. 231-242, 2023.

M. Rodriguez-Ibánez, A. Casánez-Ventura, F. Castejón-Mateos, dan P.-M. Cuenca-Jiménez, “A review on sentiment analysis from social media platforms,” Expert Syst. Appl., vol. 223, pp. 119-131, 2023.

O. Alsemaree, A. S. Alam, S. S. Gill, dan S. Uhlig, “Sentiment analysis of Arabic social media texts: A machine learning approach to deciphering customer perceptions,” Heliyon, vol. 10, no. 9, pp. 156-168, 2024.

M. K. Chandan dan S. Mandal, “A comprehensive survey on sentiment analysis: Framework, techniques, and applications,” Comput. Sci. Rev., vol. 58, pp. 100-117, 2025.

D. Aviano, B. L. Putro, E. P. Nugroho, dan H. Siregar, “Behavioral tracking analysis on learning management system with apriori association rules algorithm,” dalam 2017 3rd International Conference on Science in Information Technology (ICSITech), pp. 372–377, 2017.

G. Chaubey, P. R. Gavhane, D. Bisen, dan S. K. Arjaria, “Customer purchasing behavior prediction using machine learning classification techniques,” J. Ambient Intell. Humaniz. Comput., vol. 14, no. 12, pp. 16133–16157, 2023.

K. C. Mouli dkk., “An analysis on classification models for customer churn prediction,” Cogent Eng., vol. 11, no. 1, pp. 278-298, 2024.

T. Pitka dkk., “Time analysis of online consumer behavior by decision trees, GUHA association rules, and formal concept analysis,” Journal of Marketing Analytics, vol. 13, no. 1, pp. 29–52, 2025.

M. Ouzir, H. C. Lamrani, R. L. Bradley, dan I. El Moudden, “Neuromarketing and decision-making: Classification of consumer preferences based on changes analysis in the EEG signal of brain regions,” Biomed. Signal Process. Control, vol. 87, pp. 105-469, 2024.

T. A. Alghamdi dan N. Javaid, “A survey of preprocessing methods used for analysis of big data originated from smart grids,” Ieee Access, vol. 10, pp. 29149–29171, 2022.

H. Liu, X. Chen, dan X. Liu, “A study of the application of weight distributing method combining sentiment dictionary and TF-IDF for text sentiment analysis,” Ieee Access, vol. 10, pp. 32280–32289, 2022.

F. Shehzad, A. Rehman, K. Javed, K. A. Alnowibet, H. A. Babri, dan H. T. Rauf, “Binned term count: An alternative to term frequency for text categorization,” Mathematics, vol. 10, no. 21, pp. 41-64, 2022.

K. L. Tan, C. P. Lee, K. M. Lim, dan K. S. M. Anbananthen, “Sentiment analysis with ensemble hybrid deep learning model,” IEEE Access, vol. 10, pp. 103694–103704, 2022.

M. Ilić, Z. Srdjević, dan B. Srdjević, “Water quality prediction based on Naive Bayes algorithm,” Water Science and Technology, vol. 85, no. 4, pp. 1027–1039, 2022.

V. Piccialli dan M. Sciandrone, “Nonlinear optimization and support vector machines,” Ann. Oper. Res., vol. 314, no. 1, pp. 15–47, 2022.

A. Tharwat, “Classification assessment methods,” Applied computing and informatics, vol. 17, no. 1, pp. 168–192, 2021.

U. Norinder dan P. Norinder, “Predicting Amazon customer reviews with deep confidence using deep learning and conformal prediction,” Journal of Management Analytics, vol. 9, no. 1, pp. 1–16, 2022, doi: 10.1080/23270012.2022.2031324.

Y. Rimal dan N. Sharma, “Ensemble machine learning prediction accuracy: local vs. global precision and recall for multiclass grade performance of engineering students,” Front. Educ. (Lausanne)., vol. 10, pp. 1–27, 2025, doi: 10.3389/feduc.2025.1571133.

A. Ogunpola, F. Saeed, S. Basurra, A. M. Albarrak, dan S. N. Qasem, “Machine Learning-Based Predictive Models for Detection of Cardiovascular Diseases,” Diagnostics, vol. 14, no. 2, pp. 1–31, 2024, doi: 10.3390/diagnostics14020144.

D. Chicco dan G. Jurman, “The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation,” BMC Genomics, vol. 21, no. 1, pp. 1376–1397, 2020, doi: 10.1186/s12864-019-6413-7.

A. J. Bingham, “From Data Management to Actionable Findings: A Five-Phase Process of Qualitative Data Analysis,” Int. J. Qual. Methods, vol. 22, pp. 1–26, 2023, doi: 10.1177/16094069231183620.

N. C. C. Brown, P. Weill-Tessier, M. Sekula, A. L. Costache, dan M. Kölling, “Novice Use of the Java Programming Language,” ACM Transactions on Computing Education, vol. 23, no. 1, pp. 1–29, 2022, doi: 10.1145/3551393.

D. Chicco, L. Oneto, dan E. Tavazzi, “Eleven quick tips for data cleaning and feature engineering,” PLoS Comput. Biol., vol. 18, no. 12, pp. 2678-2687, 2022, doi: 10.1371/journal.pcbi.1010718.

S. Demir dan B. Topcu, “Graph-based Turkish text normalization and its impact on noisy text processing,” Engineering Science and Technology, an International Journal, vol. 35, pp. 1-28, 2022, doi: 10.1016/j.jestch.2022.101192.

J. Khan, K. Ahmad, S. K. Jagatheesaperumal, dan K. A. Sohn, “Textual variations in social media text processing applications: challenges, solutions, and trends,” Artif. Intell. Rev., vol. 58, no. 3, pp. 3509-3518, 2025, doi: 10.1007/s10462-024-11071-z.

S. Sarica dan J. Luo, “Stopwords in technical language processing,” PLoS One, vol. 16, no. 8, pp. 1–17, 2021, doi: 10.1371/journal.pone.0254937.

Z. Jiang, B. Gao, Y. He, Y. Han, P. Doyle, dan Q. Zhu, “Text Classification Using Novel Term Weighting Scheme-Based Improved TF-IDF for Internet Media Reports,” Math. Probl. Eng., vol. 2021, pp. 3908-3918, 2021, doi: 10.1155/2021/6619088.

H. Liu, X. Chen, dan X. Liu, “A Study of the Application of Weight Distributing Method Combining Sentiment Dictionary and TF-IDF for Text Sentiment Analysis,” IEEE Access, vol. 10, pp. 32280–32289, 2022, doi: 10.1109/ACCESS.2022.3160172.

M. Tabany dan M. Gueffal, “Sentiment Analysis and Fake Amazon Reviews Classification Using SVM Supervised Machine Learning Model,” Journal of Advances in Information Technology, vol. 15, no. 1, pp. 49–58, 2024, doi: 10.12720/jait.15.1.

X. Luo, “Efficient English text classification using selected Machine Learning Techniques,” Alexandria Engineering Journal, vol. 60, no. 3, pp. 3401–3409, 2021, doi: 10.1016/j.aej.2021.02.009.

E. Elgeldawi, A. Sayed, A. R. Galal, dan A. M. Zaki, “Hyperparameter tuning for machine learning algorithms used for arabic sentiment analysis,” Informatics, vol. 8, no. 4, pp. 1–22, 2021, doi: 10.3390/informatics8040079.


The PDF file you selected should load here if your Web browser has a PDF reader plug-in installed (for example, a recent version of Adobe Acrobat Reader).

If you would like more information about how to print, save, and work with PDFs, Highwire Press provides a helpful Frequently Asked Questions about PDFs.

Alternatively, you can download the PDF file directly to your computer, from where it can be opened using a PDF reader. To download the PDF, click the Download link above.

Fullscreen Fullscreen Off

Full Text: File PDF

How To Cite This :

Refbacks

  • There are currently no refbacks.