Public Sentiment Dynamics: Analysis of Twitter/X Data on the 2024 Indonesian Election with NB-SVM
DOI:
https://doi.org/10.30865/mib.v8i3.7710Keywords:
General Election, Naïve Bayes, Public Sentiment, Sentiment Analysis, Support Vector Machine, TwitterAbstract
This research analyzes the dynamics of public sentiment towards three pairs of presidential candidates in the 2024 Indonesian Election. This research was conducted using Twitter data as a source of information to gain a deeper understanding of the pattern of public sentiment during six crucial phases in the context of the election. The data is analyzed periodically during the election period. Sentiment analysis was carried out using the Naïve Bayes-Support Vector Machine classification approach to understand the sentiment patterns that emerged in each phase. NB-SVM utilizes class frequency information from NB to weight features, then trains separate SVMs for each class using these weighted features, improving classification accuracy. Models using NB-SVM classification produce better accuracy than models using NB and SVM classification, with an average accuracy of 76%. In Pair 01, a dynamic pattern was formed, namely a decrease in the level of positive sentiment during the debate and increasing again at a later time. Meanwhile, for Pair 02 and 03, a pattern was not formed for different reasons, namely sentiment that was too stable for Pair 02, and unstable sentiment for Pair 03. While Pair 01 obtained the most positive sentiment, Pair 02 received the most negative, with an average of 65.19% during the election process. This research proves that the results of sentiment analysis on Twitter/X contradict the official results by KPU of the general election in Indonesia.
References
R. Asmara, M. F. Ardiansyah, and M. Anshori, “Analisa Sentiment Masyarakat terhadap Pemilu 2019 berdasarkan Opini di Twitter menggunakan Metode Naive Bayes Classifier,†INOVTEK Polbeng - Seri Inform., vol. 5, no. 2, p. 193, 2020, doi: 10.35314/isi.v5i2.1095.
L. A. Andika, P. A. N. Azizah, and R. Respatiwulan, “Analisis Sentimen Masyarakat terhadap Hasil Quick Count Pemilihan Presiden Indonesia 2019 pada Media Sosial Twitter Menggunakan Metode Naive Bayes Classifier,†Indones. J. Appl. Stat., vol. 2, no. 1, p. 34, 2019, doi: 10.13057/ijas.v2i1.29998.
M. H. Al-Areef and K. Saputra S, “Analisis Sentimen Pengguna Twitter Mengenai Calon Presiden Indonesia Tahun 2024 Menggunakan Algoritma LSTM,†J. SAINTIKOM (Jurnal Sains Manaj. Inform. dan Komputer), vol. 22, no. 2, p. 270, 2023, doi: 10.53513/jis.v22i2.8680.
H. N. Chaudhry et al., “Sentiment analysis of before and after elections: Twitter data of U.S. election 2020,†Electron., vol. 10, no. 17, pp. 1–26, 2021, doi: 10.3390/electronics10172082.
S. Juanita, “Analisis Sentimen Persepsi Masyarakat Terhadap Pemilu 2019 Pada Media Sosial Twitter Menggunakan Naive Bayes,†J. Media Inform. Budidarma, vol. 4, no. 3, p. 552, 2020, doi: 10.30865/mib.v4i3.2140.
A. R. Adiati, A. Herdiani, and W. Astuti, “Analisis Sentimen Masyarakat Pada Media Sosial Twitter Terhadap Partai Politik Peserta Pemilihan Umum 2019 Menggunakan Naive Bayes Classifier,†eProceedings …, vol. 6, no. 2, 2019, [Online]. Available: https://openlibrarypublications.telkomuniversity.ac.id/index.php/engineering/article/viewFile/9836/9697.
N. Hayatin, G. I. Marthasari, and L. Nuraini, “Optimization of Sentiment Analysis for Indonesian Presidential Election using Naïve Bayes and Particle Swarm Optimization,†J. Online Inform., vol. 5, no. 1, pp. 81–88, 2020, doi: 10.15575/join.v5i1.558.
A. Muzaki and A. Witanti, “Sentiment Analysis of the Community in the Twitter To the 2020 Election in Pandemic Covid-19 By Method Naive Bayes Classifier,†J. Tek. Inform., vol. 2, no. 2, pp. 101–107, 2021, doi: 10.20884/1.jutif.2021.2.2.51.
F. Nurrizky and S. Dwiasnati, “Comparison of Naive Bayes and Support Vector Machine (SVM) Algorithms Regarding The Popularity of Presidential Candidates In The Upcoming 2024 Presidential Election,†Comput. Eng. Appl. J., vol. 13, no. 1, pp. 17–28, 2024, doi: 10.18495/comengapp.v13i1.459.
B. A. Putra, Mustakim, M. Afdal, and Zarnelly, “Sentiment Analysis of Presidential Candidates of the Republic of Indonesia Using Naïve Bayes Classifier and Support Vector Machine,†Proc. 7th 2023 Int. Conf. New Media Stud. CONMEDIA 2023, pp. 263–268, 2023, doi: 10.1109/CONMEDIA60526.2023.10428221.
L. Damayanti and K. M. Lhaksmana, “Sentiment Analysis of the 2024 Indonesia Presidential Election on Twitter,†Sinkron, vol. 8, no. 2, pp. 938–946, 2024, doi: 10.33395/sinkron.v8i2.13379.
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.
O. Zoellanda A.Tane, K. Muslim Lhaksmana, and F. Nhita, “Analisis Sentimen pada Twitter Tentang Calon Presiden 2019 Menggunakan Metode SVM (Support Vector Machine),†eProceedings Eng., vol. 6, no. 2, pp. 9716–9725, 2019.
A. D. Akmal, I. Permana, H. Fajri, and Y. Yuliarti, “Opini Masyarakat Twitter terhadap Kandidat Bakal Calon Presiden Republik Indonesia Tahun 2024,†J. Manaj. dan Ilmu Adm. Publik, vol. 4, no. 4, pp. 292–300, 2022, doi: 10.24036/jmiap.v4i4.160.
H. Wang, Y. Shi, X. Zhou, Q. Zhou, S. Shao, and A. Bouguettaya, “Web service classification using support vector machine,†Proc. - Int. Conf. Tools with Artif. Intell. ICTAI, vol. 1, pp. 3–6, 2010, doi: 10.1109/ICTAI.2010.9.
B. Rijanto Rudy, “Bahan pembelajaran dinamika kelompok,†Kementeri. Pertahanan Ri Badan Pendidik. dan Pelatih., p. 52, 2020.
B. Gaye, D. Zhang, and A. Wulamu, “Improvement of Support Vector Machine Algorithm in Big Data Background,†Math. Probl. Eng., vol. 2021, 2021, doi: 10.1155/2021/5594899.
M. Rahardi, A. Aminuddin, F. F. Abdulloh, and R. A. Nugroho, “Sentiment Analysis of Covid-19 Vaccination using Support Vector Machine in Indonesia,†Int. J. Adv. Comput. Sci. Appl., vol. 13, no. 6, pp. 534–539, 2022, doi: 10.14569/IJACSA.2022.0130665.
PKPU3/2022, UU7/2017, PKPU8/2019, and PKPU4/2021, “Peraturan Komisi Pemilihan Umum Nomor 3 Tahun 2022 Tentang Tahapan Dan Jadwal Penyelenggaraan Pemilihan Umum Tahun 2024,†Komisi Pemilihan Umum, 2022.
S. Mujahidin, B. Prasetio, and M. C. C. Utomo, “Implementasi Analisis Sentimen Masyarakat Mengenai Kenaikan Harga BBM Pada Komentar Youtube Dengan Metode Gaussian naïve bayes,†Voteteknika (Vocational Tek. Elektron. dan Inform., vol. 10, no. 3, p. 17, 2022, doi: 10.24036/voteteknika.v10i3.118299.
KPU, “Keputusan Komisi Pemilihan Umum Nomor 360 Tahun 2024 tentang Penetapan Hasil Pemilihan Umum Presiden dan Wakil Presiden, Anggota Dewan Perwakilan Rakyat, Dewan Perwakilan Daerah, Dewan Perwakilan Rakyat Daerah Provinsi, dan Dewan Perwakilan Rakyat Daerah,†Komisi Pemilihan Umum, 2024, [Online]. Available: https://jdih.kpu.go.id/detailkepkpu-4a645456523031524a544e454a544e45.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 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 Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment 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 acknowledgment 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 (Refer to The Effect of Open Access).