Sentiment Analysis of Public Opinion on The Plastic Waste Issue on Social Media X Using TF-IDF, Naïve Bayes, and SVM
DOI:
https://doi.org/10.63158/journalisi.v8i4.1782Keywords:
Sentiment Analysis, Plastic Waste, Social Media X, TF-IDF, Support Vector MachineAbstract
Plastic waste has become a critical environmental challenge due to increasing consumption patterns and inadequate waste management practices. Understanding public perceptions of plastic waste issues is essential for supporting environmental awareness and policy development. Social Media X provides a large-scale and real-time source of public opinions that can be analyzed through sentiment analysis techniques. This study aims to identify public sentiment trends regarding plastic waste issues on Social Media X and compare the performance of Naïve Bayes and Support Vector Machine (SVM) algorithms using TF-IDF feature extraction. The research applies the CRISP-DM framework, including data understanding, data preparation, preprocessing, modeling, evaluation, and visualization stages. A total of 7,277 Indonesian-language posts were collected through web scraping, with 7,275 posts retained after data preparation. The preprocessing process consisted of cleansing, case folding, tokenization, stopword removal, normalization, and lexicon-based sentiment labeling. The dataset was classified into three sentiment categories: positive, negative, and neutral. Model performance was evaluated using Accuracy, Precision, Recall, F1-score, Macro F1-score, Balanced Accuracy, and Stratified 5-Fold Cross-Validation. The results show that SVM achieved better performance than Naïve Bayes, with an accuracy of 83.64%, Macro F1-score of 79.00%, and Balanced Accuracy of 75.94%. These findings indicate that SVM is more effective for sentiment classification of Indonesian plastic waste discussions using TF-IDF-based text representation.
Downloads
References
[1] R. Rinanda et al., “Plastic Waste Management: A Bibliometric Analysis (1992–2022),” Sustainability (Switzerland), vol. 15, no. 24, Dec. 2023, doi: 10.3390/su152416840.
[2] N. F. Pambudi, S. M. S. M. K. Samarakoon, T. M. Simatupang, R. M. C. Ratnayake, and N. B. Mulyono, “Risk management for the circular economy business model sustainability of reduce, reuse, and recycling in plastic waste management,” Discover Sustainability, vol. 6, no. 1, Dec. 2025, doi: 10.1007/s43621-025-02134-4.
[3] M. R. Kelly, M. R. Cordova, S. Jobling, and R. C. Thompson, “Meta-analysis of the spatial distribution and composition of plastic macro-debris in Indonesia,” Reg. Stud. Mar. Sci., vol. 90, Dec. 2025, doi: 10.1016/j.rsma.2025.104460.
[4] S. Bengesi, T. Oladunni, R. Olusegun, and H. Audu, “A Machine Learning-Sentiment Analysis on Monkeypox Outbreak: An Extensive Dataset to Show the Polarity of Public Opinion From Twitter Tweets,” IEEE Access, vol. 11, pp. 11811–11826, 2023, doi: 10.1109/ACCESS.2023.3242290.
[5] I. P. Rahayu, A. Fauzi, and J. Indra, “Analisis Sentimen Terhadap Program Kampus Merdeka Menggunakan Naive Bayes Dan Support Vector Machine,” Jurnal Sistem Komputer dan Informatika (JSON), vol. 4, no. 2, p. 296, Dec. 2022, doi: 10.30865/json.v4i2.5381.
[6] N. Dwi Husna Sadikin and S. Susanti, “Analisis Sentimen Publik Terhadap Kampanye Pengurangan Sampah Plastik Menggunakan Algoritma Naïve Bayes,” JURNAL FASILKOM, vol. 15, no. 2, pp. 202–212, Aug. 2025, doi: 10.37859/jf.v15i2.9574.
[7] Syahril Dwi Prasetyo, Shofa Shofiah Hilabi, and Fitri Nurapriani, “Analisis Sentimen Relokasi Ibukota Nusantara Menggunakan Algoritma Naïve Bayes dan KNN,” Jurnal KomtekInfo, pp. 1–7, Jan. 2023, doi: 10.35134/komtekinfo.v10i1.330.
[8] K. L. Tan, C. P. Lee, and K. M. Lim, “A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research,” Applied Sciences, vol. 13, no. 7, p. 4550, Apr. 2023, doi: 10.3390/app13074550.
[9] Z. A. Diekson, M. R. B. Prakoso, M. S. Q. Putra, M. S. A. F. Syaputra, S. Achmad, and R. Sutoyo, “Sentiment analysis for customer review: Case study of Traveloka,” Procedia Comput. Sci., vol. 216, pp. 682–690, 2023, doi: 10.1016/j.procs.2022.12.184.
[10] M. Z. Ali, Ehsan-Ul-Haq, S. Rauf, K. Javed, and S. Hussain, “Improving Hate Speech Detection of Urdu Tweets Using Sentiment Analysis,” IEEE Access, vol. 9, pp. 84296–84305, 2021, doi: 10.1109/ACCESS.2021.3087827.
[11] M. Errami, M. A. Ouassil, R. Rachidi, B. Cherradi, S. Hamida, and A. Raihani, “Sentiment Analysis on Moroccan Dialect based on ML and Social Media Content Detection,” International Journal of Advanced Computer Science and Applications, vol. 14, no. 3, pp. 415–425, 2023, doi: 10.14569/IJACSA.2023.0140347.
[12] E. R. Nababan, I. Made, D. Maysanjaya, and G. S. Mahendra, “Analisis Sentimen Destinasi Wisata Kabupaten Karangasem pada Ulasan Digital Menggunakan Model IndoBERT,” TEKNOMATIKA, vol. 16, no. 01, pp. 25–37, Mar. 2026, doi: 10.61423/3gf4n981.
[13] B. Liu, “Sentiment Analysis and Opinion Mining,” Synthesis Lectures on Human Language Technologies, vol. 5, no. 1, pp. 1–167, May 2012, doi: 10.2200/S00416ED1V01Y201204HLT016.
[14] M. Das, S. K., and P. J. A. Alphonse, “A Comparative Study on TF-IDF feature Weighting Method and its Analysis using Unstructured Dataset,” Aug. 2023, Accessed: Jul. 24, 2026. [Online]. Available: http://arxiv.org/abs/2308.04037
[15] G. Salton and C. Buckley, “Term-Weighting Approaches in Automatic Text Retrieval,” Inf. Process. Manag., vol. 24, no. 5, pp. 513–523, 1988.
[16] N. E. Salassa, A. Patanduk, A. Yusupa, and Y. D. Y. Rindengan, “Comparative Analysis of Naive Bayes and Support Vector Machine for Sentiment Classification of Indonesian-Language Mobile Application Reviews on Google Play Store,” Jurnal Ilmiah Informatika dan Komputer, vol. 3, no. 1, pp. 20–25, Jun. 2026, doi: 10.69533/informatech.volume3number1.515.
[17] A. Mccallum and K. Nigam, “A Comparison of Event Models for Naive Bayes Text Classification,” AAAI Conference on Artificial Intelligence, pp. 41–48, 1998, Accessed: Jul. 31, 2026. [Online]. Available: https://cdn.aaai.org/Workshops/1998/WS-98-05/WS98-05-007.pdf
[18] C. Cortes, V. Vapnik, and L. Saitta, “Support-Vector Networks,” Mach. Learn., vol. 20, no. 3, pp. 273–297, 1995, doi: 10.1007/BF00994018.
[19] C. J. C. Burges, “A Tutorial on Support Vector Machines for Pattern Recognition,” Data Min. Knowl. Discov., vol. 2, no. 2, pp. 121–167, 1998, doi: 10.1023/A:1009715923555.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Information Systems and Informatics

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors Declaration
- The Authors certify that they have read, understood, and agreed to the Journal of Information Systems and Informatics (JournalISI) submission guidelines, policies, and submission declaration. The submission has been prepared using the provided template.
- The Authors certify that all authors have approved the publication of this manuscript and that there is no conflict of interest.
- The Authors confirm that the manuscript is their original work, has not received prior publication, is not under consideration for publication elsewhere, and has not been previously published.
- The Authors confirm that all authors listed on the title page have contributed significantly to the work, have read the manuscript, attest to the validity and legitimacy of the data and its interpretation, and agree to its submission.
- The Authors confirm that the manuscript is not copied from or plagiarized from any other published work.
- The Authors declare that the manuscript will not be submitted for publication in any other journal or magazine until a decision is made by the journal editors.
- If the manuscript is finally accepted for publication, the Authors confirm that they will either proceed with publication immediately or withdraw the manuscript in accordance with the journal’s withdrawal policies.
- The Authors agree that, upon publication of the manuscript in this journal, they transfer copyright or assign exclusive rights to the publisher, including commercial rights














