Skip to content
Open access

Sentiment Analysis of Public Opinion on The Plastic Waste Issue on Social Media X Using TF-IDF, Naïve Bayes, and SVM

Aug 2026 · Journal of Information Systems and Informatics · 0 citations · 18 references

Abstract

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.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.