Instagram-Based Sentiment Analysis on the Oil Refinery Project in Batam Using SVM and XGBoost
DOI:
https://doi.org/10.35314/am1zxb64Keywords:
SVM, XGBoost, Sentiment Analysis, OversamplingAbstract
This sentiment analysis of Instagram comments regarding the planned construction of an oil refinery in Batam classifies public opinion into three categories: positive, neutral, and negative. The initial dataset of 1,576 comments was reduced to 1,441 after text preprocessing (tokenization, stop‑word removal, and stemming), and then split into 1,152 training instances and 289 testing instances. Two machine learning algorithms, Support Vector Machine (SVM) with class_weight='balanced' and Extreme Gradient Boosting (XGBoost) with oversampling, were applied to address class imbalance. In addition to accuracy (SVM: 81.25%; XGBoost: 96%), precision, recall, and F1‑score metrics were evaluated to assess the balance between true‑positive and true‑negative classifications. The results indicate that XGBoost not only outperformed SVM in terms of accuracy but also achieved the highest F1‑score on the minority class, demonstrating its ability to detect negative opinions that have often been overlooked. This study offers a novel contribution to Instagram-based sentiment analysis a platform that is visually distinct from Twitter by focusing on public opinions surrounding the strategic issue of energy infrastructure development. The findings can be utilized for real-time sentiment mapping, supporting policy formulation, urban planning, and monitoring industry responses to critical projects in the digital era.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2025 INOVTEK Polbeng - Seri Informatika

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.