Preprint has been published in a journal as an article
DOI of the published article https://doi.org/10.21070/pels.v4i0.1395
Preprint / Version 1

Sentiment Analysis Before Presidential Election 2024 Using Naïve Bayes Classifier Based on Public Opinion in Twitter

Analisa Sentimen Jelang Pilpres 2024 Menggunakan Naïve Bayes Classifier Berdasarkan Opini Publik di Twitter

##article.authors##

DOI:

https://doi.org/10.21070/ups.2248

Keywords:

Naive Bayes, Public Opinion, Sentiment Analysis, Twitter

Abstract

This study aims to determine the performance of the Naïve Bayes Classifier algorithm and sentiment analysis tested on a dataset obtained from Twitter social media scrapping with the topic of 2024 presidential candidates. Three candidates frequently discussed in public spaces were used as keyword parameters in data mining: #anis, #ganjar, and #pilpres2024, which were successfully converted to ".xlsx" format documents. The results of the study showed that the best Naïve Bayes model was obtained in the first experiment with a 10% testing data and 90% training data composition, resulting in 71% accuracy, 93% precision, 66% recall, and an fmeasure score of 77%. The conclusion of the study is that the electability of the 2024 presidential candidates shapes public opinion and generates public sentiment in the form of positive and negative tweets. Positive tweets had a higher percentage of 71.5% (1543), while negative sentiment tweets accounted for 28.5% (614). 

Downloads

Download data is not yet available.

References

M. A. Firmansyah, D. Mulyana, S. Karlinah, and S. Sumartias, “Kontestasi Pesan Politik dalam Kampanye Pilpres 2014 di Twitter: Dari Kultwit Hingga Twitwar,” JIK, vol. 16, no. 1, p. 42, Jan. 2018, doi: 10.31315/jik.v16i1.2681.

A. Septiana, “Analisis Fungsi Partai Politik Pada Pilkada Musi Banyuasin 2017 (Studi Terhadap Partai Politik Pengusung Pasangan Dodi Reza Dan Beni Hernedi),” jssp, vol. 3, no. 1, pp. 28–41, Jun. 2019, doi: 10.19109/jssp.v3i1.4066.

S. Wu, J. M. Hofman, W. A. Mason, and D. J. Watts, “Who says what to whom on twitter,” in Proceedings of the 20th international conference on World wide web, Hyderabad India: ACM, Mar. 2011, pp. 705–714. doi: 10.1145/1963405.1963504.

P. Patmawati and M. Yusuf, “Analisis Topik Modelling Terhadap Penggunaan Sosial Media Twitter oleh Pejabat Negara,” bits, vol. 3, no. 3, pp. 122–129, Dec. 2021, doi: 10.47065/bits.v3i3.1012.

I. W. D. Gafatia and N. Hadinata, “Analisis Pro Kontra Vaksin Covid 19 Menggunakan Sentiment Analysis Sumber Media Sosial Twitter,” JPSII, vol. 2, no. 1, pp. 34–42, Nov. 2021, doi: 10.47747/jpsii.v2i1.544.

M. D. Devika, C. Sunitha, and A. Ganesh, “Sentiment Analysis: A Comparative Study on Different Approaches,” Procedia Computer Science, vol. 87, pp. 44–49, 2016, doi: 10.1016/j.procs.2016.05.124.

I. Kurniawan and A. Susanto, “Implementasi Metode K-Means dan Naïve Bayes Classifier untuk Analisis Sentimen Pemilihan Presiden (Pilpres) 2019,” Jurnal Eksplora Informatika, vol. 9, no. 1, pp. 1–10, Sep. 2019, doi: 10.30864/eksplora.v9i1.237.

E. I. Saptanti, “Analisis Manajemen Impresi Ma’ruf Amin dalam Debat Pilpres 2019,” ULTIMA Comm, vol. 12, no. 2, pp. 262–284, Dec. 2020, doi: 10.31937/ultimacomm.v12i2.1573.

Y. Sahria, “Implementasi Teknik Web Scraping pada Jurnal SINTA Untuk Analisis Topik Penelitian Kesehatan Indonesia,” 2020.

N. L. P. M. Putu, Ahmad Zuli Amrullah, and Ismarmiaty, “Analisis Sentimen dan Pemodelan Topik Pariwisata Lombok Menggunakan Algoritma Naive Bayes dan Latent Dirichlet Allocation,” RESTI, vol. 5, no. 1, pp. 123–131, Feb. 2021, doi: 10.29207/resti.v5i1.2587.

H. Annur, “Klasifikasi Masyarakat Miskin Menggunakan Metode Naive Bayes,” Ilk. J. Ilm., vol. 10, no. 2, pp. 160–165, Aug. 2018, doi: 10.33096/ilkom.v10i2.303.160-165.

D. T. Anggraeni, “FORECASTING HARGA SAHAM MENGGUNAKAN METODE SIMPLE MOVING AVERAGE DAN WEB SCRAPPING,” jurnalmatrik, vol. 21, no. 3, pp. 234–241, Dec. 2019, doi: 10.33557/jurnalmatrik.v21i3.726.

D. Gunawan, “Metode Klasifikasi pada Data Preprocessing Data,” no. 1, 2016.

D. Darwis, E. S. Pratiwi, andA. F. O. Pasaribu, “PENERAPAN ALGORITMA SVM UNTUK ANALISIS SENTIMEN PADA DATA TWITTER KOMISI PEMBERANTASAN KORUPSI REPUBLIK INDONESIA,” Edutic, vol. 7, no. 1, Nov. 2020, doi: 10.21107/edutic.v7i1.8779.

S. Raschka, “Naive Bayes and Text ClassificationI -Introduction and Theory.” arXiv, Feb. 14, 2017. Accessed: May 25, 2023. [Online]. Available: http://arxiv.org/abs/1410.5329

Posted

2023-08-16