Public Sentiment Analysis on Ethanol-Blended Fuel News Using Support Vector Machine and Naïve Bayes - Muhammad Khadafi; Riza Pahlevi; Eni Rohaini (Yayasan Cita Cendekiawan Al Khwarizmi, 2026)
The increasing discourse surrounding ethanol-blended fuel policy in Indonesia has generated substantial public opinion across digital media platforms. Understanding this public sentiment is essential for policymakers and stakeholders in formulating effective communication strategies and evidence-based policy decisions. This study aims to (1) implement Support Vector Machine (SVM) and Naïve Bayes algorithms for classifying public sentiment toward ethanol-blended fuel news and (2) compare the performance of both algorithms using accuracy, precision, recall, and F1-score metrics. A total of 1,492 YouTube comments were collected through web scraping and preprocessed using case folding, tokenization, normalization, and stemming. Features were extracted using Term Frequency–Inverse Document Frequency (TF-IDF), and sentiments were classified into positive, negative, and neutral categories. Model performance was evaluated using a confusion matrix and the aforementioned metrics. Results show that SVM achieved a higher test accuracy of 73% and mean cross-validation accuracy of 72.05%, while Naïve Bayes obtained 61% and 64.94%, respectively. SVM also demonstrated superior weighted precision on the test set (0.72 vs. 0.65), whereas Naïve Bayes achieved higher macro recall (0.50 vs. 0.37) and macro F1-score (0.47 vs. 0.35). Cross-validation results showed a similar pattern. A Paired T-Test confirmed statistically significant differences between the models across all evaluation metrics (accuracy p=0.00016, precision p=0.039, recall p<0.001, F1-score p<0.001). This study contributes to Indonesian-language sentiment analysis in the renewable energy policy domain and provides insights into public perception of the national ethanol fuel blending program.