Optimizing Sentiment Analysis on Clothing Reviews Using a BERT-Based Model and Firefly Algorithm for Hyperparameter Tuning
摘要
User comments on clothing websites offer valuable feedback for both potential customers and apparel companies. However, manually analyzing large comment sections is time-consuming. Therefore, this study explores the use of a machine learning model based on bidirectional encoder representations from transformers (BERT) for sentiment analysis of these comments. Given the challenge of optimizing model performance, which is non-deterministic polynomial hard (NP-hard), a hybrid firefly algorithm (FA) for hyperparameters’ tuning challenge is introduced. This optimizer is applied to an adaptive boosting (AdaBoost) classifier, achieving an accuracy of 86.9%. Obtained results are compared to other common metaheuristics algorithms, and proposed hybrid optimizer demonstrated superior performance, making it an effective approach for improving sentiment analysis models. Besides capturing accuracy, other metrics, such as f1-score, precision, and recall per each class, were also observed.