Sentiment Analysis of President Prabowo's Performance on Twitter (X) with a Comparative Study of SVM, XGBoost, and AdaBoost
DOI:
https://doi.org/10.30871/jaic.v10i1.12138Keywords:
Sentiment Analysis, Machine Learning, Prabowo Subianto, Twitter (X)Abstract
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.
Downloads
References
[1] R. Rahmatulloh, M. Iqbal Ibrahim, M. R. Handayani`, K. Umam, and N. C. H. Wibowo, “Model Klasifikasi Naive Bayes untuk Pemetaan Persepsi Publik Secara Real-Time pada Media Sosial: Studi Kasus RUU TNI 2025,” Decod. J. Pendidik. Teknol. Inf., vol. 5, no. 2 SE-Articles, pp. 365–379, Jul. 2025, doi: 10.51454/decode.v5i2.1139.
[2] D. P. Astuti and L. Wulandari, “Satire Media Sosial: Medium Baru Pembentukan Persepsi Politik Generasi Z,” JISPO J. Ilmu Sos. dan Ilmu Polit., vol. 15, no. 1 SE-, pp. 1–30, Jun. 2025, doi: 10.15575/jispo.v15i1.43980.
[3] S. K. RI, “Satu Tahun Kabinet Merah Putih, Presiden Prabowo: “Kita Telah Bekerja Keras dan Hasilnya Dirasakan Rakyat Read more: https://setkab.go.id/satu-tahun-kabinet-merah-putih-presiden-prabowo-kita-telah-bekerja-keras-dan-hasilnya-dirasakan-rakyat/.” [Online]. Available: https://setkab.go.id/satu-tahun-kabinet-merah-putih-presiden-prabowo-kita-telah-bekerja-keras-dan-hasilnya-dirasakan-rakyat/
[4] A. I., “Satu Tahun Pemerintahan Prabowo-Gibran: Fondasi Kuat Menuju Indonesia yang Mandiri dan Sejahtera,” Nov. 14, 2025, Indonesia.go.id. [Online]. Available: https://indonesia.go.id/kategori/feature/10204/satu-tahun-pemerintahan-prabowo-gibran-fondasi-kuat-menuju-indonesia-yang-mandiri-dan-sejahtera?lang=1
[5] M. AminiMotlagh, H. Shahhoseini, and N. Fatehi, “A reliable sentiment analysis for classification of tweets in social networks,” Soc. Netw. Anal. Min., vol. 13, no. 1, p. 7, 2022, doi: 10.1007/s13278-022-00998-2.
[6] L. Zhang, Q. Jiang, W. Xiong, and W. Zhao, “Evaluating the quality of digital education resources based on learners’ online reviews through topic modeling and opinion mining,” Educ. Inf. Technol., vol. 30, no. 11, pp. 15207–15230, 2025, doi: 10.1007/s10639-025-13407-w.
[7] M. F. Azhar and G. N. Bakry, “Pengaruh Penggunaan Twitter (X) terhadap Orientasi Pemilih Pemula pada Pemilihan Presiden 2024,” JSSH (Jurnal Sains Sos. dan Humaniora), vol. 9, no. 1 SE-Artikel, pp. 101–112, May 2025, doi: 10.30595/jssh.v9i1.20385.
[8] Data Reportal, “X Pengguna, Statistik, Data, Tren, dan Lainnya — DataReportal – Wawasan Digital Global.” Accessed: Oct. 13, 2025. [Online]. Available: https://datareportal.com/essential-x-stats?utm_source=DataReportal&utm_medium=Country_Article_Hyperlink&utm_campaign=Digital_2025&utm_term=Indonesia&utm_term=Indonesia&utm_content=X_Stats_Link
[9] T. Safitri, Y. Umaidah, and I. Maulana, “Analisis Sentimen Pengguna Twitter Terhadap Grup Musik BTS Menggunakan Algoritma Support Vector Machine,” J. Appl. Informatics Comput., vol. 7, no. 1 SE-Articles, pp. 34–41, Jul. 2023, doi: 10.30871/jaic.v7i1.5039.
[10] A. N. Rahmanto, “Media Sosial dan Persepsi Publik tentang Good Governance pada Pemerintah Daerah di Solo Raya,” J. Ilmu Komun., vol. 20, no. 1, p. 88, May 2022, doi: 10.31315/jik.v20i1.6433.
[11] M. D. Rizqi, W. A. Saputra, and M. Murahman, “Menggali Hubungan antara Media Sosial dan Kebijakan Pemerintah: Pendekatan Bibliometrik dan Tinjauan Pustaka,” J. Kawistara, vol. 13, no. 3, p. 389, Dec. 2023, doi: 10.22146/kawistara.78591.
[12] S. Alfataah and N. Cahyono, “Sentimen Analisis Pengguna Twitter Terhadap Provider Xl Axiata Menggunakan Metode Support Vector Machine,” JATI (Jurnal Mhs. Tek. Inform., 2025, doi: 10.36040/jati.v9i3.13647
[13] N. Hadi and D. Sugiarto, “Analisis Sentimen Pembangunan IKN pada Media Sosial X Menggunakan Algoritma SVM, Logistic Regression dan Naïve Bayes,” J. Inform. J. Pengemb. IT, vol. 10, no. 1, pp. 37–49, Jan. 2025, doi: 10.30591/jpit.v10i1.7106.
[14] I. K. Nti and A. R. Somanathan, “A Scalable RF-XGBoost Framework for Financial Fraud Mitigation,” IEEE Trans. Comput. Soc. Syst., vol. 11, no. 2, pp. 1556–1563, 2024, doi: 10.1109/TCSS.2022.3209827.
[15] I. R. Hendrawan, E. Utami, and A. D. Hartanto, “Comparison of Naïve Bayes Algorithm and XGBoost on Local Product Review Text Classification,” Edumatic J. Pendidik. Inform., vol. 6, no. 1, pp. 143–149, 2022, doi: 10.29408/edumatic.v6i1.5613.
[16] A. Choudhury, A. Mondal, and S. Sarkar, “Searches for the BSM scenarios at the LHC using decision tree-based machine learning algorithms: a comparative study and review of random forest, AdaBoost, XGBoost and LightGBM frameworks,” Eur. Phys. J. Spec. Top., vol. 233, no. 15, pp. 2425–2463, 2024, doi: 10.1140/epjs/s11734-024-01308-x.
[17] M. R. Fauzan, S. Anraeni, and L. Budiman Ilmuwan, “Analisis Sentimen Tweet Netizen Terhadap Timnas Sepak Bola Indonesia di Era Shin Tae-Yong Menggunakan Algoritma Support Vector Machine (SVM),” LINIER Lit. Inform. dan Komputer; Vol 2, No 3 (2025)DO - 10.33096/linier.v2i3.3144 , Oct. 2025, doi: 10.33096/linier.v2i3.3144
[18] X. Liu, J. Sun, A. Lei, and J. Zhu, “Research and Applications of Large Language Models for Converting Unstructured Data into Structured Data,” in 2024 3rd International Conference on Cloud Computing, Big Data Application and Software Engineering (CBASE), 2024, pp. 305–308. doi: 10.1109/CBASE64041.2024.10824634.
[19] M. Siino, I. Tinnirello, and M. La Cascia, “Is text preprocessing still worth the time? A comparative survey on the influence of popular preprocessing methods on Transformers and traditional classifiers,” Inf. Syst., vol. 121, p. 102342, 2024, doi: https://doi.org/10.1016/j.is.2023.102342.
[20] Supriyono, A. P. Wibawa, Suyono, and F. Kurniawan, “Advancements in natural language processing: Implications, challenges, and future directions,” Telemat. Informatics Reports, vol. 16, p. 100173, 2024, doi: https://doi.org/10.1016/j.teler.2024.100173.
[21] L. Rohmatun and A. Baita, “Machine Learning-Based Sentiment Analysis on Twitter (X): A Case Study of the ‘Kabur Aja Dulu’ Issue Using SVM,” J. Appl. Informatics Comput., vol. 9, no. 4, pp. 1972–1983, 2025, doi: 10.30871/jaic.v9i4.9991.
[22] M. Rahardi, A. Aminuddin, F. Abdulloh, and R. Nugroho, “Sentiment Analysis of Covid-19 Vaccination using Support Vector Machine in Indonesia,” Int. J. Adv. Comput. Sci. Appl., vol. 13, Jan. 2022, doi: 10.14569/IJACSA.2022.0130665.
[23] N. W. S. Saraswati, C. P. Yanti, I. D. M. K. Muku, and D. A. P. R. Dewi, “Evaluation Analysis of the Necessity of Stemming and Lemmatization in Text Classification,” MATRIK J. Manajemen, Tek. Inform. dan Rekayasa Komput., vol. 24, no. 2 SE-Articles, pp. 321–332, doi: 10.30812/matrik.v24i2.4833.
[24] S. Biswas, K. Young, and J. Griffith, “A Comparison of Automatic Labelling Approaches for Sentiment Analysis,” in International Conference on Data Technologies and Applications, 2022. doi: 10.48550/arXiv.2211.02976
[25] G. D’Aniello, M. Gaeta, and I. La Rocca, “KnowMIS-ABSA: an overview and a reference model for applications of sentiment analysis and aspect-based sentiment analysis,” Artif. Intell. Rev., vol. 55, no. 7, pp. 5543–5574, 2022, doi: 10.1007/s10462-021-10134-9.
[26] M. I. Arif Chandra and R. Yusuf, “Visualisasi Kata Kunci Pemberitaan Pemilu 2024 Menggunakan Scapy Dan Wordcloud ,” Tek. Teknol. Inf. dan Multimed., vol. 5, no. 1 SE-Articles, pp. 41–46, Jun. 2024, doi: 10.46764/teknimedia.v5i1.187.
[27] M. R. Ningsih and J. Unjung, “Sentiment Analysis on SocialMedia Using TF-IDF Vectorization and H2O Gradient Boosting for Student Anxiety Detection,” Sci. J. Informatics, vol. 11, no. 4, pp. 1137–1144, 2025, doi: 10.15294/sji.v12i1.20582.
[28] G. Tamami, W. A. Triyanto, and S. Muzid, “Sentiment Analysis Mobile JKN Reviews Using SMOTE Based LSTM,” IJCCS (Indonesian J. Comput. Cybern. Syst., vol. 19, no. 1, p. 13, 2025, doi: 10.22146/ijccs.101910.
[29] H. Bichri, A. Chergui, and M. Hain, “Investigating the Impact of Train / Test Split Ratio on the Performance of Pre-Trained Models with Custom Datasets,” Int. J. Adv. Comput. Sci. Appl., 2024, doi : 10.14569/IJACSA.2024.0150235
[30] J. T. Kumalasari and I. Puspitorini, “Perbandingan Metode Klasifikasi dan SMOTE Terhadap Analisa Sentimen Mobil Listrik Indonesia,” J. Minfo Polgan, vol. 13, no. 2 SE-, pp. 2257–2268, Jan. 2025, doi: 10.33395/jmp.v13i2.14428.
[31] F. Izhari, “Pemodelan Perilaku Penggunaan Media Sosial Mahasiswa dengan Algoritma XGBoost,” J. Minfo Polgan, vol. 14, no. 1, pp. 1303–1308, 2025, doi: 10.33395/jmp.v14i1.15030.
[32] M. J. Paput, K. Suryowati, and M. T. Jatipaningrum, “Perbandingan Metode Random Forest Dan Adaptive Boosting Pada Klasifikasi Indeks Pembangunan Manusia Di Indonesia,” J. Stat. Ind. dan Komputasi, vol. 8, no. 2, pp. 73–83, 2023, doi: 10.34151/statistika.v8i2.4458.
[33] S. Mulyani and T. Arifin, “Prediksi Kelangsungan Hidup Pasien Gagal Jantung Menggunakan Pendekatan Machine Learning dengan Optimasi GridSearchCV,” J. Inform. Polinema, vol. 11, no. 4 SE-Articles, pp. 577–586, Aug. 2025, doi: 10.33795/jip.v11i4.7938.
[34] W. Nugraha and A. Sasongko, “Hyperparameter Tuning on Classification Algorithm with Grid Search,” Sistemasi, vol. 11, no. 2, p. 391, 2022, doi: 10.32520/stmsi.v11i2.1750.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Anang Maruf, Afril Efan Pajri, Putri Liana

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








