Sentiment Analysis of Electric Vehicles in Indonesia Using Support Vector Machine and Naïve Bayes
Rizki Aziz Ekatama, Majid Rahardi, Afrig Aminuddin, Ferian Fauzi Abdulloh · 2023
In recent years, electric vehicles have become a prominent and widely-discussed topic on the global stage. This heightened interest can be attributed to various factors, including the growing awareness of the negative environmental impacts associated with traditional vehicles, the diminishing reserves of oil resources, and advancements in advanced battery technology. As a result, electric vehicles have emerged as a significant and strategic choice for mitigating carbon emissions and reducing air pollution. In Indonesia, electric vehicles have ignited the public’s diverse sentiments through the Twitter platform. These sentiments encompass a spectrum of perspectives, including positive, negative, and neutral. Thus, the primary objective of this study is to conduct a comprehensive sentiment analysis of electric vehicles in the Indonesian context. This analysis involves a comparative evaluation of two machine learning algorithms, the Support Vector Machine (SVM) and Naïve Bayes, both demonstrated to be efficient classification algorithms in sentiment analysis. Both algorithms incorporate the Synthetic Minority Oversampling Technique (SMOTE) to address the challenge of imbalanced class data. The sentiment results are derived from a dataset comprising 3178 Twitter data instances, with 1,818 representing neutral sentiment, 870 reflecting positive sentiment, and 490 indicating negative sentiment. The research findings reveal that SVM achieves notably high-performance metrics, with accuracy, precision, recall, and F1 score, achieving impressive results of 91.02%, 91.00%, 91.01%, and 91.00%, respectively. In contrast, Naïve Bayes yields comparatively lower scores, with accuracy at 83.68%, precision at 83.91%, recall at 83.61%, and F1 score at 83.51%.