Implementasi Metode SVM Pada Sentimen Analisis Terhadap Pemilihan Presiden (Pilpres) 2024 Di Twitter
Abstract
The focus of the research is the use of Twitter as a platform to express the political opinions of the Indonesian people regarding the 2024 Presidential Election. By utilizing sentiment analysis using the Support Vector Machine (SVM) method, this research aims to evaluate the accuracy of SVM in classifying tweets and compare the performance of four types of SVM kernels. Visualizations of positive and negative sentiments are also generated to provide a clearer picture. The stages of the research involve Twitter data collection, and pre-processing with steps such as data cleansing, case folding, tokenizing, stemming, and filtering. Labeling is done to identify sentiment, then feature extraction using TF-IDF. SVM implementation with linear, polynomial, RBF, and sigmoid kernels is performed, followed by model evaluation using precision, recall, F-measure, and accuracy metrics. The study used SVM to analyze the sentiment of the 2024 presidential election on Twitter data. As a result, out of 3938 tweets, 1575 were positive and 2363 were negative. The SVM model achieved 95.05% accuracy, superior in predicting negative sentiment. Comparison of SVM kernels shows the highest accuracy in the linear kernel 95.43%. Sentiment analysis on tweets shows a majority of positive support for Ganjar 54.9%, while Anies and Prabowo have support levels of 15.8% and 29.3% respectively.
Keywords
References
A. Ahmad, “77415-ID-perkembangan-teknologi-komunikasi-dan-in,” Dakwah Tabligh, vol. 13, pp. 137–149, 2012.
G. Nugroho, D. Murdiansyah, and K. Lhaksmana, “Analisis Sentimen Pemilihan Presiden Amerika 2020 di Twitter Menggunakan Naïve Bayes dan Support Vector Machine,” e-Proceeding Eng., vol. 8, no. 5, pp. 10106–10115, 2021, [Online]. Available: https://openlibrarypublications.telkomuniversity.ac.id/index.php/engineering/article/view/15727/15440
“Digital-2023-Indonesia-February-2023-V01_Compressed.Pdf.” 2023. [Online]. Available: https://s.id/digital-2023-indonesia
S. N. J. Fitriyyah, N. Safriadi, and E. E. Pratama, “Analisis Sentimen Calon Presiden Indonesia 2019 dari Media Sosial Twitter Menggunakan Metode Naive Bayes,” J. Edukasi dan Penelit. Inform., vol. 5, no. 3, p. 279, 2019, doi: 10.26418/jp.v5i3.34368.
M. I. Khatami, “The Existence Of ‘ Baliho 2024 ’ In The Electricity Fight : Image Analysis Of Political Figures,” J. Imu Sos. dan Ilmu Polit. Univ. Jambi, vol. 5, no. 2, pp. 14–24, 2021.
C. S. Hudaya, H. Fakhrurroja, and A. Alamsyah, “Analisis Persepsi Konsumen Terhadap Brand Go-Jek Pada Media Sosial Twitter Menggunakan Metode Sentiment Analysis Dan Topic Modelling,” J. Mitra Manaj., vol. 3, no. 6, pp. 664–673, 2019, doi: 10.52160/ejmm.v3i6.244.
B. Pang, L. Lee, and S. Jose, “Techniques,” 2002.
B. Santosa, “Data Mining Teknik Pemanfaatan Data untuk Keperluan Bisnis,” Graha Ilmu Yogyakarta., 2007.
S. Herwasto, I. M. I. Subroto, and B. Assegaf, “Sentiment Analysis of Indonesian Figure using Support Vector Machine,” J. Telemat. Informatics, vol. 6, no. 3, pp. 230–237, 2018.
A. L. Hananto, A. P. Nardilasari, A. Fauzi, A. Hananto, B. Priyatna, and A. Y. Rahman, “Best Algorithm in Sentiment Analysis of Presidential Election in Indonesia on Twitter,” Int. J. Intell. Syst. Appl. Eng., vol. 11, no. 6s, pp. 473–481, 2023.
D. W. Seno and A. Wibowo, “Analisis Sentimen Data Twitter Tentang Pasangan Capres-Cawapres Pemilu 2019 Dengan Metode Lexicon Based Dan Support Vector Machine,” J. Ilm. FIFO, vol. 11, no. 2, p. 144, 2019, doi: 10.22441/fifo.2019.v11i2.004.
B. M. Iqbal, K. M. Lhaksmana, and E. B. Setiawan, “2024 Presidential Election Sentiment Analysis in News Media Using Support Vector Machine,” J. Comput. Syst. Informatics, vol. 4, no. 2, pp. 397–404, 2023, doi: 10.47065/josyc.v4i2.3051.
A. M. F. Hulu and K. M. Lhaksmana, “Analisis Sentimen Politik pada Twitter Menggunakan Metode Support Vector Machine (Studi Kasus : Pilpres 2019),” e-Proceeding Eng., vol. 6, no. 2, pp. 2017–2020, 2019.
G. A. BUNTORO, R. ARIFIN, G. N. SYAIFUDDIIN, A. SELAMAT, O. KREJCAR, and H. FUJITA, “Implementation of a Machine Learning Algorithm for Sentiment Analysis of Indonesia‘s 2019 Presidential Election,” IIUM Eng. J., vol. 22, no. 1, pp. 78–92, 2021, doi: 10.31436/IIUMEJ.V22I1.1532.
N. Saputra, “( Sentiment Analisys With Lexicon Preprocessing ),” Din. Inform., vol. 7, no. 1, pp. 45–57, 2019.
D. Alita, “Multiclass SVM Algorithm for Sarcasm Text in Twitter,” JATISI (Jurnal Tek. Inform. dan Sist. Informasi), vol. 8, no. 1, pp. 118–128, 2021, doi: 10.35957/jatisi.v8i1.646.
P. Elisa and A. Rahman Isnain, “Comparison of Random Forest, Support Vector Machine and Naive Bayes Algorithms to Analyze Sentiment Towards Mental Health Stigma,” J. Tek. Inform., vol. 5, no. 1, pp. 321–329, 2024, [Online]. Available: https://doi.org/10.52436/1.jutif.2024.5.1.1817
I. D. Kurniati et al., Buku Ajar. 2015.
D. Wahyudi, T. Susyanto, and D. Nugroho, “Implementasi Dan Analisis Algoritma Stemming Nazief & Adriani Dan Porter Pada Dokumen Berbahasa Indonesia,” J. Ilm. SINUS, vol. 15, no. 2, pp. 49–56, 2017, doi: 10.30646/sinus.v15i2.305.
S. Styawati, N. Hendrastuty, and A. R. Isnain, “Analisis Sentimen Masyarakat Terhadap Program Kartu Prakerja Pada Twitter Dengan Metode Support Vector Machine,” J. Inform. J. Pengemb. IT, vol. 6, no. 3, pp. 150–155, 2021, doi: 10.30591/jpit.v6i3.2870.
N. L. Ratniasih, M. Sudarma, and N. Gunantara, “Penerapan Text Mining Dalam Spam Filtering Untuk Aplikasi Chat,” Maj. Ilm. Teknol. Elektro, vol. 16, no. 3, p. 13, 2017, doi: 10.24843/mite.2017.v16i03p03.
D. Alita and R. A. Shodiqin, “Sentimen Analisis Vaksin Covid-19 Menggunakan Naive Bayes Dan Support Vector Machine,” J. Artif. Intell. Technol. Inf., vol. 1, no. 1, pp. 1–12, 2023, doi: 10.58602/jaiti.v1i1.20.
W. P. Anggraini and M. S. Utami, “Klasifikasi Sentimen Masyarakat Terhadap Kebijakan Kartu Pekerja Di Indonesia,” Fakt. Exacta, vol. 13, no. 4, p. 255, 2021, doi: 10.30998/faktorexacta.v13i4.7964.
D. Alita, Y. Fernando, and H. Sulistiani, “Implementasi Algoritma Multiclass Svm Pada Opini Publik Berbahasa Indonesia Di Twitter,” J. Tekno Kompak, vol. 14, no. 2, p. 86, 2020, doi: 10.33365/jtk.v14i2.792.
DOI: https://doi.org/10.30591/jpit.v9i2.6560
Refbacks
- There are currently no refbacks.

This work is licensed under a Creative Commons Attribution 4.0 International License.
JPIT INDEXED BY
![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | |

This work is licensed under a Creative Commons Attribution 4.0 International License.









