International Journal of Global Operations Research
Vol. 6 No. 2 (2025): International Journal of Global Operations Research (IJGOR), May 2025

Comparison of Grid Search and Random Search Effectiveness in Parameter Tuning on Electric Car Sentiment Analysis

Saputra, Moch Panji Agung (Unknown)
Dwiputra, Muhammad Bintang Eighista (Unknown)



Article Info

Publish Date
05 Jun 2025

Abstract

The increasing use of electric cars in Indonesia has prompted many public discussions recorded on various digital platforms. This study aims to classify public sentiment towards the implementation of electric cars through comment analysis using the XGBoost Classifier model. The data used were obtained from the Kaggle platform, in the form of public comments that have gone through pre-processing stages, such as removing empty data, label encoding, and visualizing class distribution. Furthermore, the data was divided into training, validation, and test data using stratification techniques, and data imbalance was handled using the SMOTE method. Modeling was carried out using the XGBoost Classifier algorithm, then hyperparameter tuning was carried out using two approaches, namely Random Search and Grid Search. The parameters tested included learning_rate, max_depth, n_estimators, subsample, colsample_bytree, gamma, alpha, and lambda. The experimental results showed that the model without tuning produced an accuracy of 67%. After tuning, Random Search increased its accuracy to 68%, while Grid Search achieved the highest accuracy of 69%. Based on evaluation using precision, recall, f1-score, and accuracy metrics, tuning with Grid Search is proven to provide more optimal results compared to other methods. This study shows that systematic hyperparameter tuning can improve the performance of sentiment classification models.

Copyrights © 2025






Journal Info

Abbrev

ijgor

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Economics, Econometrics & Finance Engineering Mathematics

Description

International Journal of Global Operations Research (IJGOR) is published 4 times a year and is the flagship journal of the Indonesian Operational Research Association (IORA). It is the aim of IJGOR to present papers which cover the theory, practice, history or methodology of OR. However, since OR is ...