Public Sentiment Analisys on the Phenomenom of Body Shaming on Social Media X Using the Extreme Gradient Boosting Algorithm - Nadya Raudathul Sofa; Dahlan Abdullah; Maryana Maryana (International Journal of Engineering, Science and Information Technology, 2026)
The phenomenon of body shaming on social media platform X (Twitter) has become increasingly widespread and has caused various psychological impacts on its victims. The high level of social media activity has made the spread of negative comments related to body shape more difficult to control. Therefore, a system capable of automatically performing sentiment analysis is needed to identify public opinions regarding this phenomenon. This study aims to implement the Extreme Gradient Boosting (XGBoost) algorithm in classifying public sentiment toward the body shaming phenomenon on social media X and to determine the sentiment analysis results obtained. The research data were collected using a web scraping technique through Tweet Harvest, resulting in 1,383 Indonesian-language tweets which were manually classified into three sentiment classes: positive, negative, and neutral. The text preprocessing stage included case folding, cleansing, tokenizing, normalization, and filtering without applying stemming, as it was proven to reduce model performance on social media text data. Feature weighting was carried out using the TF-IDF method, while the data were divided using an 80:20 ratio with the implementation of Random Over Sampling (ROS) to address class imbalance. The XGBoost model was built using parameters of n_estimators = 300, learning_rate = 0.05, and max_depth = 5. The evaluation results using a confusion matrix showed an accuracy value of 80.87%, with F1-scores of 0.85 for the negative class, 0.71 for the neutral class, and 0.81 for the positive class. The results indicate that the XGBoost algorithm is capable of classifying public sentiment toward the body shaming phenomenon with fairly good performance. In addition, a web-based sentiment analysis system was successfully implemented to facilitate the automatic and structured sentiment classification process.