Sentiment Analysis of Social Media X in the 2024 Indonesian Presidential Election Using the Naive Bayes Algorithm: Candidates' Backgrounds and Political Promises

  • Santi Prayudani Politeknik Negeri Medan
  • Dita Rouli Basa Situmorang Politeknik Negeri Medan
  • Rizki Hidayah Politeknik Negeri Medan
  • Heri Sanjaya Ginting Politeknik Negeri Medan
Keywords: Sentiment analysis, Naive Bayes, Social Media, 2024 presidential election

Abstract

In 2024, Indonesia holds a presidential election, and the candidates are making promises to each other to attract voters. Many people gave their opinions on X. This study uses the Naïve Bayes algorithm to analyze the sentiment of these tweets, with the aim of understanding the background of the candidates and their campaign promises. Data is collected from X by crawling technique, then data is pre-processed, trained using Naïve Bayes model, and evaluated for accuracy. Sentiments in tweets were classified as positive, negative, or neutral. The results showed that the Prabowo Subianto - Gibran Rakabuming Raka pair was the most talked about with 1005 tweets, followed by Anis Rasyid Baswedan - Muhaimin Iskandar with 707 tweets, and Ganjar Pranowo - Mohammad Mahfud M.D. with 572 tweets. The Prabowo Subianto - Gibran Rakabuming Raka pair received the most positive sentiment, which was 446 more than the other candidates.

Downloads

Download data is not yet available.

References

O. Papakyriakopoulos, J. Carlos, M. Serrano, and S. Hegelich, “Political communication on social media: A tale of hyperactive users and bias in recommender systems,” 2019, doi: 10.1016/j.osnem.2019.10.

P. Al Muqsith Prasetyo and A. Hermawan, “Analisis sentimen X terhadap pemilihan presiden menggunakan algoritma Naive Bayes,” INFOTECH : Jurnal Informatika & Teknologi, vol. 4, no. 2, pp. 224–233, Dec. 2023, doi: 10.37373/infotech.v4i2.863.

N. G. Ramadhan, M. Wibowo, N. F. L. Mohd Rosely, and C. Quix, “Opinion mining indonesian presidential election on X data based on decision tree method,” JURNAL INFOTEL, vol. 14, no. 4, pp. 243–248, Nov. 2022, doi: 10.20895/infotel.v14i4.832.

A. Hijratul Rakhmah and T. Allita Putri, “Analisis Sentimen Terhadap Pasangan Calon Presiden 2019 Pada Media Sosial X,” Jakarta Gedung Sentra Kramat Jl. Kramat Raya.

M. Wongkar and A. Angdresey, “Sentiment Analysis Using Naive Bayes Algorithm Of The Data Crawler : X.”

E. Kouloumpis, T. Wilson, and J. Moore, “X Sentiment Analysis: The Good the Bad and the OMG!” [Online]. Available: www.aaai.org

T. Rosyida, H. P. Putro, and H. Wahyono, “Analisis Sentimen Terhadap Pilpres 2024 Berdasarkan Opini Dari X Menggunakan Naive Bayes dan SVM”, [Online]. Available: www.apjii.or.id

S. Chohan, A. Nugroho, A. Maezar Bayu Aji, W. Gata, and S. Nusa Mandiri, “Analisis Sentimen Aplikasi Duolingo Menggunakan Metode Naive Bayes dan Synthetic Minority Over Sampling Technique,” vol. 22, no. 2, 2020, doi: 10.31294/p.v21i2.

R. V. B. Vangara*, K. Thirupathur, and S. P. Vangara, “Opinion Mining Classification u sing Naive Bayes Algorithm,” International Journal of Innovative Technology and Exploring Engineering, vol. 9, no. 5, pp. 495–498, Mar. 2020, doi: 10.35940/ijitee.E2402.039520.

Y. Y. Lase, A. R. Lubis, F. Elyza, and S. A. Syafli, “Mental Health Sentiment Analysis on Social Media TikTok with the Naive Bayes Algorithm,” in Proceedings - 2023 6th International Conference on Computer and Informatics Engineering: AI Trust, Risk and Security Management (AI Trism), IC2IE 2023, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 186–191. doi: 10.1109/IC2IE60547.2023.10331126.

S. Inkoom, J. Sobanjo, A. Barbu, and X. Niu, “ Pavement Crack Rating Using Machine Learning Frameworks: Partitioning, Bootstrap Forest, Boosted Trees, Naive Bayes, and K -Nearest Neighbors ,” Journal of Transportation Engineering, Part B: Pavements, vol. 145, no. 3, p. 04019031, Sep. 2019, doi: 10.1061/jpeodx.0000126.

V. A. Fitri, R. Andreswari, and M. A. Hasibuan, “Sentiment analysis of social media X with case of Anti-LGBT campaign in Indonesia using Naive Bayes, decision tree, and random forest algorithm,” in Procedia Computer Science, Elsevier B.V., 2019, pp. 765–772. doi: 10.1016/j.procs.2019.11.181.

A. F. Hidayatullah, S. Cahyaningtyas, and A. M. Hakim, “Sentiment Analysis on X using Neural Network: Indonesian Presidential Election 2019 Dataset,” IOP Conf Ser Mater Sci Eng, vol. 1077, no. 1, p. 012001, Feb. 2021, doi: 10.1088/1757-899x/1077/1/012001.

J. Hartmann, M. Heitmann, C. Siebert, and C. Schamp, “More than a Feeling: Accuracy and Application of Sentiment Analysis,” International Journal of Research in Marketing, vol. 40, no. 1, pp. 75–87, Mar. 2023, doi: 10.1016/j.ijresmar.2022.05.005.

K. Chakraborty, S. Bhattacharyya, and R. Bag, “A Survey of Sentiment Analysis from Social Media Data,” IEEE Trans Comput Soc Syst, vol. 7, no. 2, pp. 450–464, Apr. 2020, doi: 10.1109/TCSS.2019.2956957.

A. L. Hananto, A. P. Nardilasari, A. Fauzi, A. Hananto, B. Priyatna, and A. Y. Rahman, “International Journal of Intelligent Systems And Applications In Engineering Best Algorithm in Sentiment Analysis of Presidential Election in Indonesia on X.” [Online]. Available: www.ijisae.org

R. G. Bhati, “A Survey On Sentiment Analysis Algorithms And Datasets,” Review of Computer Engineering Research, vol. 6, no. 2, pp. 84–91, Sep. 2019, doi: 10.18488/journal.76.2019.62.84.91.

K. L. Tan, C. P. Lee, and K. M. Lim, “A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research,” Applied Sciences (Switzerland), vol. 13, no. 7. MDPI, Apr. 01, 2023. doi: 10.3390/app13074550.

E. Prabowo, D. Rahmat Hidayat, D. Sugiana, and B. Aly, “Political Socialisation and Political Communication in Delivering Political Education and Being Community Aspiration Absorber in Indonesia.” [Online]. Available: www.ijicc.net

O. Papakyriakopoulos, J. Carlos, M. Serrano, and S. Hegelich, “Political communication on social media: A tale of hyperactive users and bias in recommender systems,” 2019, doi: 10.1016/j.osnem.2019.10.

H. Fitra, S. Dosen, J. Jurnalistik, F. Dakwah, and D. Komunikasi, “Pengaruh Dan Efektivitas Penggunaan Media Sosial Sebagai Bentuk Saluran Komunikasi (Haidir Fitra Siagian) Pengaruh Dan Efektivitas Penggunaan Media Sosial Sebagai Saluran Komunikasi Politik Dalam Membentuk Opini Publik.”

P. Basile, V. Basile, M. Nissim, N. Novielli, and V. Patti, “Sentiment Analysis of Microblogging Data,” in Encyclopedia of Social Network Analysis and Mining, Springer New York, 2017, pp. 1–17. doi: 10.1007/978-1-4614-7163-9_110168-1.

K. Orkphol and W. Yang, “Sentiment Analysis on Microblogging with K-Means Clustering and Artificial Bee Colony,” Int J Comput Intell Appl, vol. 18, no. 3, Sep. 2019, doi: 10.1142/S1469026819500172.

M. Iqbal, “Social Network Analysis: Public Trust And Digital Movement Of The Covid-19 Era In Indonesia,” 2022.

Published
2024-10-04
How to Cite
[1]
S. Prayudani, D. R. B. Situmorang, R. Hidayah, and H. S. Ginting, “Sentiment Analysis of Social Media X in the 2024 Indonesian Presidential Election Using the Naive Bayes Algorithm: Candidates’ Backgrounds and Political Promises”, JAIC, vol. 8, no. 2, pp. 291-295, Oct. 2024.
Section
Articles