This study was conducted to understand how Twitter (X) users respond to President Prabowo's performance through machine learning-based sentiment analysis. Data was collected using a dataset crawling approach, then processed through a series of pre-processing stages such as cleansing, case folding, tokenisation, stopword removal, and stemming before being converted into a numerical representation with TF-IDF. The class imbalance problem was addressed by applying SMOTE so that the model could learn more evenly. Three classification algorithms, SVM, XGBoost, and AdaBoost, were tested with the help of GridSearchCV to obtain the best parameter configuration. The research evaluation showed that the XGBoost algorithm was able to provide the best performance with an accuracy of 0.8443, followed by the SVM algorithm with an RBF kernel, which achieved an accuracy of 0.8135. The AdaBoost algorithm came in third with an accuracy of 0.7868. These findings indicate that the boosting approach, especially XGBoost, is better able to handle complex language patterns and high-dimensional text data characteristics. Overall, this study provides an overview of public opinion trends on social media and can be used as a reference for the development of sentiment analysis models in future research.
Copyrights © 2026