Indonesia Public Sentiment Analysis on X Using the Bi-GRU and IndoBERT Methods: Case Study The 2024 DKI Jakarta Regional Head Election

Aldian Juventiano Leksmana, Izzatul Ummah, Kemas Muslim LhaksmanaNon-Scopus13 Desember 2025Afiliasi: ID

Abstrak

The 2024 Jakarta Regional Head Election (Pilkada) generated a massive volume of public opinion on platform X, but the analysis was hampered by informal language and an imbalance of sentiment data. This research aims to conduct a comparative analysis and optimization of the deep learning model for the classification of sentiment in tweets related to the Regional Elections, with input in the form of tweet text and output in the form of sentiment classification (positive, negative, neutral). This topic is important to accurately understand the dynamics of public opinion. The current research gap is the limited systematic comparison between the Transformer (IndoBERT) and Recurrent (Bi-GRU) architectures after going through the data balancing treatment and hyperparameter optimization on Indonesian political data.The proposed solution is a structured research flow that begins with balancing the training data using Random Over-Sampling (ROS) to overcome class bias, which is then continued with hyperparameter optimization to find the configuration best for each model. The results of the experiment showed that the IndoBERT model consistently outperformed the Bi-GRU. After going through all the optimization stages, the IndoBERT model achieved peak performance with a Macro F1-Score of 0.99, while the optimal Bi-GRU model achieved a Macro F1-Score of 0.92. The contribution of this research is to provide a clear performance benchmark between the two architectures and prove that the combination of data balancing and hyperparameter tuning is an effective methodology to achieve accurate sentiment classification results in Indonesian texts.

Identifier

Scroll to Top