Instagram-Based Sentiment Analysis on the Oil Refinery Project in Batam Using SVM and XGBoost - Doni Immanuel Rumapea; Ozzi Suria (Journal of Innovation and Technology Polbeng Series on Informatics (INOVTEK Polbeng - Seri Informatika), 2025)
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.