COMPARISON OF XGBOOST AND SVM FOR SENTIMENT ANALYSIS MERAH PUTIH COOPERATIVE POLICY

Authors

  • Wahyu Pratama Lasaleng Universitas Negeri Gorontalo
  • Fahrezal Zubedi Universitas Negeri Gorontalo
  • Siti Nurmardia Abdussamad Universitas Negeri Gorontalo

DOI:

https://doi.org/10.21009/JSA.10105

Keywords:

Extreme Gradient Boosting, Hyperparameter Tuning, Sentiment Analysis, Support Vector Machine, TF-IDF

Abstract

Large volumes of textual data have been generated by the rapid growth of social media, making sentiment analysis an effective approach for understanding public perceptions of government policies. However, text classification still faces challenges such as high feature dimensionality, class imbalance, and non-linear relationships within the data. This study used data from the X social media platform to evaluate the performance of the Support Vector Machine (SVM) and XGBoost algorithms in classifying public sentiment toward the Koperasi Desa Merah Putih policy. The dataset consisted of 1,074 tweets collected through a scraping technique between July 21 and November 4, 2025, comprising 800 positive tweets and 274 negative tweets. The research process included data preprocessing, feature extraction using TF-IDF, data splitting with an 80:20 ratio, and hyperparameter tuning using GridSearchCV with 5-fold cross-validation. The models were evaluated using accuracy, precision, recall, and F1-score. Hyperparameter tuning successfully enhanced the performance of both models, with SVM benefiting the most from the optimisation process. The findings demonstrated that both models achieved strong classification performance; however, SVM outperformed XGBoost. The SVM model achieved an accuracy of 95%, with more balanced precision, recall, and F1-score values across both sentiment classes, whereas XGBoost achieved an accuracy of 91% and showed limitations in detecting negative sentiment as the minority class. The data exploration results also indicated that most users expressed positive sentiment toward the Koperasi Desa Merah Putih policy. Nevertheless, this study has several limitations, particularly the use of TF-IDF-based feature representation, which does not capture semantic relationships or sarcasm in textual data. The novelty of this study lies in the comparison of SVM and XGBoost with hyperparameter tuning using GridSearchCV in the context of sentiment analysis of the Koperasi Desa Merah Putih policy, a topic that has received limited attention in previous studies.

Author Biographies

Wahyu Pratama Lasaleng, Universitas Negeri Gorontalo

Wahyu Pratama Lasaleng lahir di Limboto pada tanggal 29 Juni 2004. Penulis saat ini sedang menempuh pendidikan Strata 1 (S1) pada Program Studi Statistika di Universitas Negeri Gorontalo. Selain sebagai mahasiswa, penulis berafiliasi dengan Universitas Negeri Gorontalo. Email penulis : wahyulasaleng05@gmail.com

Fahrezal Zubedi, Universitas Negeri Gorontalo

Fahrezal Zubedi lahir di Gorontalo pada tanggal 6 Juni 1994. Penulis menempuh pendidikan Strata 1 (S1) pada Program Studi Pendidikan Matematika di Universitas Negeri Gorontalo. Penulis melanjutkan pendidikan Strata 2 (S2) pada bidang Matematika di Universitas Indonesia. Penulis berafiliasi sebagai dosen pada Program Studi S1 Statistika, Universitas Negeri Gorontalo. Email penulis : fahrezal@ung.ac.id

Siti Nurmardia Abdussamad, Universitas Negeri Gorontalo

Siti Nurmardia Abdussamad lahir di Gorontalo pada tanggal 4 Maret 1995. Penulis menempuh pendidikan Strata 1 (S1) pada Program Studi Statistika Terapan di Universitas Islam Indonesia. Penulis melanjutkan pendidikan Strata 2 (S2) pada bidang Statistika Terapan di Universitas Brawijaya. Penulis berafiliasi sebagai dosen pada Program Studi S1 Statistika, Universitas Negeri Gorontalo. Email penulis : sitinurmardia@ung.ac.id

Downloads

Published

2026-06-30

How to Cite

Lasaleng, W. P., Zubedi, F., & Abdussamad, S. N. (2026). COMPARISON OF XGBOOST AND SVM FOR SENTIMENT ANALYSIS MERAH PUTIH COOPERATIVE POLICY. Jurnal Statistika Dan Aplikasinya, 10(1), 54–67. https://doi.org/10.21009/JSA.10105