Sentiment Analysis of Indonesian Presidential Candidates in the 2024 Election Using the Naïve Bayes Classifier

Mhd El Hakim - Padang State University

Abstract


In 2024, the people of Indonesia actively participated in the democratic process of electing a new president, vice president, and legislative members. This presidential election generated a wide range of public opinions across various social media platforms such as Twitter, Facebook, Instagram, and TikTok. These opinions were characterized by sentiments that were positive, negative, or neutral, directed toward the presidential candidates in the 2024 election. Consequently, this research was conducted to analyze the sentiment toward the presidential candidates based on data from Twitter. The data was gathered through a crawling process using Python with keywords "Anies," "Prabowo," and "Ganjar." After obtaining the data, it underwent cleaning and sentiment labeling using an Indonesian sentiment lexicon called InSet. Subsequently, sentiment classification was performed using the Naïve Bayes algorithm, yielding an average accuracy of 65.96%.

Full Text:

PDF

References


C. M. Annur, “Ada 27 Juta Pengguna Twitter di Indonesia, Terbanyak ke-4 Global,” https://databoks.katadata.co.id/.

L. Januru, “Analisis Wacana Kampanye Hitam (Kampanye Hitam) Pada PILPRES Tahun 2014,” Media Kompas, Jawa Pos dan Kedaulatan Rakyat, Natapraja, Apr. 02, 2016.

S. Hikmawan et al., “Sentimen Analisis Publik Terhadap Joko Widodo Terhadap Wabah Covid-19 Menggunakan Metode Machine Learning,” Jurnal Kajian Ilmiah, vol. 20, no. 2, pp. 1410–9794, 2020, [Online]. Available: http://ejurnal.ubharajaya.ac.id/index.php/JKI

F. Matresya Matulatuwa, E. Sediyono, and A. Iriani, “Text Mining Dengan Metode Lexicon Based Untuk Sentiment Analysis Pelayanan Pt. Pos Indonesia Melalui Media Sosial Twitter,” Jurnal Masyarakat Informatika Indonesia, vol. 2, no. 3, Jul. 2017.

G. A. Buntoro, R. Arifin, G. N. Syaifudiin, A. Selamat, O. krejcar, and H. Fujita, “Implementation of a Machine Learning Algorithm for Sentiment Analysis of Indonesia‘s 2019 Presidential Election,” IIUM Engineering Journal, vol. 22, no. 1, pp. 78–92, 2021, doi: 10.31436/IIUMEJ.V22I1.1532.

F. Nurpandi, F. S. Sulaeman, and A. Hermawan, “Analisis Sentimen Terhadap Kinerja Kepolisian Indonesia Menggunakan Metode Multinomial Naive Bayes, Long Short-Term Memory, dan Lexicon-Based,” Media Jurnal Informatika, vol. 16, no. 1, p. 1, Jun. 2024, doi: 10.35194/mji.v16i1.4165.

F. Koto and G. Y. Rahmaningtyas, “Inset lexicon: Evaluation of a word list for Indonesian sentiment analysis in microblogs,” in Proceedings of the 2017 International Conference on Asian Language Processing, IALP 2017, Institute of Electrical and Electronics Engineers Inc., Jul. 2017, pp. 391–394. doi: 10.1109/IALP.2017.8300625.

N. S. Purohit, A. B. Angadi, M. Bhat, and K. C. Gull, “Crawling through Web to Extract the Data from Social Networking Site-Twitter,” Bengaluru, 2015.

C. M. Bishop, Pattern Recognition and Machine Learning, 1st ed., vol. 1. New York: Springer-Verlag, 2006.

G. M. Raza, Z. S. Butt, S. Latif, and A. Wahid, “Sentiment Analysis on COVID Tweets: An Experimental Analysis on the Impact of Count Vectorizer and TF-IDF on Sentiment Predictions using Deep Learning Models,” in 2021 International Conference on Digital Futures and Transformative Technologies, ICoDT2 2021, Institute of Electrical and Electronics Engineers Inc., May 2021. doi: 10.1109/ICoDT252288.2021.9441508.

M. Ismail, N. Hassan, and S. S. Bafjaish, “Comparative Analysis of Naive Bayesian Techniques in Health-Related for Classification Task,” Journal of Soft Computing and Data Mining, vol. 1, no. 2, pp. 1–10, Dec. 2020, doi: 10.30880/jscdm.2020.01.02.001.

A. Mccallum and K. Nigam, “A Comparison of Event Models for Naive Bayes Text Classification,” Washington DC, 1998. [Online]. Available: www.aaai.org

R. E. Walpole, Pengantar Statistika Edisi Ke-3, 3rd ed., vol. 1. Jakarta: Gramedia Pustama Utama, 1992.

J. Daniel and J. H. Martin, “Naive Bayes, Text Classification, and Sentiment,” in Speech and Language Processing, 3rd ed., vol. 1, London, 2019.

M. Wankhade, A. C. S. Rao, and C. Kulkarni, “A survey on sentiment analysis methods, applications, and challenges,” Artif Intell Rev, vol. 55, no. 7, pp. 5731–5780, Oct. 2022, doi: 10.1007/s10462-022-10144-1.

Y. Shen and F. Liu, “An Approach for Semantic Web Discovery Using Unsupervised Learning Algorithms,” Cyberspace Data and Intelligence, and Cyber-Living, Syndrome, and Health, pp. 56–72, Dec. 2019.

B. Gaye and A. Wulamu, “Sentiment Analysis of Text

Classification Algorithms Using Confusion Matrix,” in Cyberspace Data and Intelligence, and Cyber-Living, Syndrome, and Health. International 2019 Cyberspace Congress, CyberDI and CyberLife, H. Ning, Ed., Singapore: Springer, 2019.




DOI: http://dx.doi.org/10.24036/unpjomath.v9i3.16440