Abstract— The importance of food as one of the three basic human needs makes food prices very important. When food prices change, it affects people and makes them express their opinions on social media. One of the popular social media is X. In order to clearly know the opinions of the wider community, sentiment classification is performed. In this research, RoBERTa is used as a method to perform sentiment classification. RoBERTa was chosen because of its reliability in understanding words as well as its performance, which has proven to be superior to other methods when working on NLP tasks. To obtain the best model, different preprocessing, fine-tuning methods, and data ratio were compared. This research uses Random Search and Bayesian Optimization as a fine-tuning method. Then each method compared with 70:30 and 80:20 data ratio. The hyperparameter combination obtained from each method then processed using the 70:30 and 80:20 data ratios. The best model obtained in this research is a model that uses Random Search as fine-tuning method with 80:20 data ratio and obtains an accuracy value of 81%. On average, this model also outperforms all the other models in this research with 76.4% accuracy. This research explores a new topic that is rarely discussed in sentiment classification research. This research also shows the impact of using different stopword libraries in determining a better sentiment distribution. Additionally, this research compares two different fine-tuning methods, Bayesian Optimization that relies on probabilistic, and Random Search that uses randomize combinations to find the best hyperparameter combination.
Keywords— Sentiment Classification, RoBERTa, Food Prices, Random Search, Bayesian Optimization