Instagram-Based Sentiment Analysis on the Oil Refinery Project in Batam Using SVM and XGBoost

Authors

  • Doni Immanuel Rumapea Universitas Mercu Buana Yogyakarta Author
  • Ozzi Suria Universitas Mercu Buana Yogyakarta Author

DOI:

https://doi.org/10.35314/am1zxb64

Keywords:

SVM, XGBoost, Sentiment Analysis, Oversampling

Abstract

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

Download data is not yet available.

Downloads

Published

16-07-2025

Issue

Section

Articles

How to Cite

Instagram-Based Sentiment Analysis on the Oil Refinery Project in Batam Using SVM and XGBoost. (2025). INOVTEK Polbeng - Seri Informatika, 10(2), 1197-1207. https://doi.org/10.35314/am1zxb64