Hyperparameter Optimization on Machine Learning Models for Twitter Sentiment Analysis of Indonesia’s New Capital (IKN)

Rangga Dipta Azhari, Muljono Muljono · 2024

The development of Indonesia’s New Capital (IKN) is a national strategic project of Indonesia that has sparked various discussions and debates in society. Sentiment analysis of Twitter data can provide a more comprehensive overview of public perception towards this project. Studies on sentiment analysis of IKN are still relatively limited, particularly concerning the optimization of hyperparameters in machine learning models. There is still research that has not applied hyperparameter optimization in the sentiment analysis process. The objectives of this research are to investigate how hyperparameter optimization affects the effectiveness of different machine learning algorithms when analyzing sentiment in Indonesian text data, and enhance the precision of sentiment analysis in machine learning models. The researchers used Random Search, Bayesian Optimization, and PSO to optimize the hyperparameter in machine learning models. Among the four tested models (SVM, KNN, Random Forest, and Logistic Regression), the most significant impact of hyperparameter optimization was observed in the KNN model. Hyperparameter optimization has a significant impact on improving the performance of KNN, as indicated by the highest accuracy increase of 0.0763 (7.63%) using Bayesian Optimization. Additionally, the SVM algorithm optimized using Random Search, combined with data balancing using SMOTE, achieved the highest accuracy of 0.7859 (78.59%) in the sentiment analysis process in this study.

Read the paper · More papers on PaperTik