Sentiment Analysis on Twitter Using Naïve Bayes and Logistic Regression for the 2024 Presidential Election

Authors

  • Alisya Mutia Mantika Informatics Study Program, Faculty of Communication and Information Technology, Universitas Nasional, Jakarta, Indonesia
  • Agung Triayudi Informatics Study Program, Faculty of Communication and Information Technology, Universitas Nasional, Jakarta, Indonesia
  • Rima Tamara Aldisa Informatics Study Program, Faculty of Communication and Information Technology, Universitas Nasional, Jakarta, Indonesia

DOI:

https://doi.org/10.58905/sana.v2i1.267

Keywords:

sentiment analysis, 2024 Presidential Election, Logistic Regression, Naive Bayes, Twitter

Abstract

In accordance with the notion of democracy which is the basis of the state of Indonesia, general elections will be held in 2024. In the implementation of the General Election there is a campaign to lead the public vote to choose the best candidate according to public opinion. Twitter social media is one of the media to voice opinions as well as share information to become one of the indirect campaigning platforms. Social media also does not escape negative issues, community rumors, and even the digital footprint of presidential candidates which can be a very important consideration in campaigning. This research aims to see the public's response to the 2024 presidential candidates. This research is conducted based on public opinion on presidential candidates, then public opinion data taken from Twitter social media will go through a pre-processing process to clean the data before the data is classified into Naive Bayes and Linear Regression modeling. The two classification models are then sought for the highest performance accuracy value and confusion matrix with 80:20 splitting data. The results showed that the Naive Bayes classification model had a higher accuracy value than the Logistic Regression classification model, which was 63% for Anies Baswedan candidate, 77% for Ganjar Pranowo candidate, and 44% for Prabowo Subianto. The highest accuracy value was obtained by the sentiment data of 2024 presidential candidate Ganjar Pranowo, which was 77%.

References

B. Delvika, Apriana, N. Abror, and U. R. Gurning, “Perbandingan Algoritma NBC dan C4.5 DalamAnalisa Sentimen Pemilihan Presiden 2024 Pada Twitter,” SENTIMAS: Seminar Nasional Penelitian Dan Pengabdian Masyarakat, vol. 1, no. 1, pp. 41–48, Aug. 2023.

H. H. Zain, R. M. Awannga, and W. I. Rahayu, “Perbandingan Model Svm, Knn Dan Naïve Bayes Untuk Analisis Sentiment Pada Data Twitter: Studi Kasus Calon Presiden 2024,” JIMPS: Jurnal Ilmiah Mahasiswa Pendidikan Sejarah, vol. 8, no. 3, Jun. 2023.

R. Vindua and A. U. Zailani, “Analisis Sentimen Pemilu Indonesia Tahun 2024 Dari Media Sosial Twitter Menggunakan Python,” JURIKOM (Jurnal Riset Komputer), vol. 10, no. 2, p. 479, Apr. 2023, doi: 10.30865/jurikom.v10i2.5945.

Fathir, M. A. Hariyadi, and Y. Miftachul A, “ANALISIS SENTIMEN ARTIKEL BERITA PEMILU BERBASIS METODE KLASIFIKASI,” Jurnal Indonesia : Manajemen Informatika dan Komunikasi, vol. 4, no. 2, pp. 485–493, May 2023, doi: 10.35870/jimik.v4i2.220.

S. Juanita, “Analisis Sentimen Persepsi Masyarakat Terhadap Pemilu 2019 Pada Media Sosial Twitter Menggunakan Naive Bayes,” JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 4, no. 3, p. 552, Jul. 2020, doi: 10.30865/mib.v4i3.2140.

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 Informatika, vol. 5, no. 2, p. 193, Nov. 2020, doi: 10.35314/isi.v5i2.1095.

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,” Jurnal Teknik Informatika (Jutif), vol. 2, no. 2, pp. 101–107, Mar. 2021, doi: 10.20884/1.jutif.2021.2.2.51.

A. Averina, H. Hadi, and J. Siswantoro, “Analisis Sentimen Multi-Kelas Untuk Film Berbasis Teks Ulasan Menggunakan Model Regresi Logistik,” Teknika, vol. 11, no. 2, pp. 123–128, Jun. 2022, doi: 10.34148/teknika.v11i2.461.

S. A. H. Bahtiar, C. K. Dewa, and A. Luthfi, “Comparison of Naïve Bayes and Logistic Regression in Sentiment Analysis on Marketplace Reviews Using Rating-Based Labeling,” Journal of Information Systems and Informatics, vol. 5, no. 3, pp. 915–927, Aug. 2023, doi: 10.51519/journalisi.v5i3.539.

K. Kelvin, J. Banjarnahor, E. I. -, and M. NK Nababan, “Analisis perbandingan sentimen Corona Virus Disease-2019 (Covid19) pada Twitter Menggunakan Metode Logistic Regression Dan Support Vector Machine (SVM),” Jurnal Sistem Informasi dan Ilmu Komputer Prima(JUSIKOM PRIMA), vol. 5, no. 2, pp. 47–52, Feb. 2022, doi: 10.34012/jurnalsisteminformasidanilmukomputer.v5i2.2365.

Ash Shiddicky and Surya Agustian, “Analisis Sentimen Masyarakat Terhadap Kebijakan Vaksinasi Covid-19 pada Media Sosial Twitter menggunakan Metode Logistic Regression,” Jurnal CoSciTech (Computer Science and Information Technology), vol. 3, no. 2, pp. 99–106, Aug. 2022, doi: 10.37859/coscitech.v3i2.3836.

I. Iwandini, A. Triayudi, and G. Soepriyono, “Analisa Sentimen Pengguna Transportasi Jakarta Terhadap Transjakarta Menggunakan Metode Naives Bayes dan K-Nearest Neighbor,” Journal of Information System Research (JOSH), vol. 4, no. 2, pp. 543–550, Jan. 2023, doi: 10.47065/josh.v4i2.2937.

M. I. Fikri, T. S. Sabrila, and Y. Azhar, “Perbandingan Metode Naïve Bayes dan Support Vector Machine pada Analisis Sentimen Twitter,” SMATIKA JURNAL, vol. 10, no. 02, pp. 71–76, Dec. 2020, doi: 10.32664/smatika.v10i02.455.

N. L. P. C. Savitri, R. A. Rahman, R. Venyutzky, and N. A. Rakhmawati, “Analisis Klasifikasi Sentimen Terhadap Sekolah Daring pada Twitter Menggunakan Supervised Machine Learning,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 7, no. 1, Apr. 2021, doi: 10.28932/jutisi.v7i1.3216.

R. Prabowo, H. Sujaini, and T. Rismawan, “Analisis Sentimen Pengguna Twitter Terhadap Kasus COVID-19 di Indonesia Menggunakan Metode Regresi Logistik Multinomial,” Jurnal Sistem dan Teknologi Informasi (JustIN), vol. 11, no. 1, p. 85, Jan. 2023, doi: 10.26418/justin.v11i1.57450.

M. R. Romadhon and F. Kurniawan, “A Comparison of Naive Bayes Methods, Logistic Regression and KNN for Predicting Healing of Covid-19 Patients in Indonesia,” in 2021 3rd East Indonesia Conference on Computer and Information Technology (EIConCIT), IEEE, Apr. 2021, pp. 41–44. doi: 10.1109/EIConCIT50028.2021.9431845.

Downloads

Published

21-02-2024