Sentiment Analysis and Classification of Public Opinion on Prabowo Subianto Using Naïve Bayes on Twitter

Authors

  • Cucu Sulaiman Department Informatics Engineering, Faculty Engineering and Computer Science, Jakarta Global University, 16412, Indonesia
  • Ummy Gusti Salamah Department Informatics Management, State Polytechnic of Sriwijaya, Palembang, 30139, Indonesia
  • Risna Oktaviati Department Informatics Engineering, State Polytechnic of Sriwijaya, Palembang, 30139, Indonesia
  • Safira Faizah Department Informatics Engineering, Faculty Engineering and Computer Science, Jakarta Global University, 16412, Indonesia

DOI:

https://doi.org/10.56904/j-gers.v3i2.98

Keywords:

sentiment analysis, twitter, dataset, algorithm, naive bayes

Abstract

In recent years, microblogging platforms have emerged as highly popular communication tools among internet users. Microblogging refers to a form of social media that enables users to share short messages—typically limited to fewer than 200 characters—containing opinions, comments, or news. One widely used microblogging service is Twitter, which attracts users from diverse backgrounds. Following the Indonesian presidential election in February 2024, numerous trending tweets expressed various opinions about Prabowo Subianto, the 8th President of Indonesia. These tweets reflected a range of sentiments, including positive, negative, and neutral viewpoints. Based on this, a sentiment analysis system is needed to efficiently analyze and classify public responses on Twitter according to sentiment categories: positive, negative, or neutral. To perform this classification, an appropriate algorithm is required. One suitable method is the Naïve Bayes classifier, a probabilistic algorithm that categorizes data by computing probability values. This method is well-suited for text classification tasks such as sentiment analysis of tweets. In this study, a dataset comprising tweets was used, consisting of 96 entries for training and 150 entries for testing, totaling 246 data points. The Naïve Bayes classifier achieved an accuracy rate of 84% using this dataset.

References

[1] M. Kamiński, T. Wieczorek, M. Kręgielska-Narożna, and P. Bogdański, ‘Tweeting about fatphobia and body shaming: A retrospective infodemiological study’, Nutrition, vol. 125, p. 112497, Sep. 2024, doi: 10.1016/j.nut.2024.112497.

[2] J. M. Lane et al., ‘Tweeting environmental pollution: Analyzing twitter language to uncover its correlation with county-level obesity rates in the United States’, Prev. Med. (Baltim)., vol. 186, p. 108081, Sep. 2024, doi: 10.1016/j.ypmed.2024.108081.

[3] M. Gandhudi, A. P.J.A., U. Fiore, and G. G.R., ‘Explainable hybrid quantum neural networks for analyzing the influence of tweets on stock price prediction’, Comput. Electr. Eng., vol. 118, p. 109302, Aug. 2024, doi: 10.1016/j.compeleceng.2024.109302.

[4] Q. Abuein, R. M. Al-Khatib, A. Migdady, M. S. Jawarneh, and A. Al-Khateeb, ‘ArSa-Tweets: A novel Arabic sarcasm detection system based on deep learning model’, Heliyon, vol. 10, no. 17, p. e36892, Sep. 2024, doi: 10.1016/j.heliyon.2024.e36892.

[5] S.-Y. Liu, J. Xiao, and X.-K. Xu, ‘Sign prediction by motif naive Bayes model in social networks’, Inf. Sci. (Ny)., vol. 541, pp. 316–331, Dec. 2020, doi: 10.1016/j.ins.2020.05.128.

[6] Muhammad Aditya Wisnu Wardana et all., ‘Development OF Canva Application Based Learning Media for E-Book Interactive’, J. Nalar Pendidik., vol. 10, pp. 71–79, 2023, doi: 10.26858/jnp.v10i1.

[7] A. A. Firdaus, A. Yudhana, I. Riadi, and Mahsun, ‘Indonesian presidential election sentiment: Dataset of response public before 2024’, Data Br., vol. 52, p. 109993, Feb. 2024, doi: 10.1016/j.dib.2023.109993.

[8] O. Peretz, M. Koren, and O. Koren, ‘Naive Bayes classifier – An ensemble procedure for recall and precision enrichment’, Eng. Appl. Artif. Intell., vol. 136, p. 108972, Oct. 2024, doi: 10.1016/j.engappai.2024.108972.

[9] Merinda Lestandy, Abdurrahim Abdurrahim, and Lailis Syafa’ah, ‘Analisis Sentimen Tweet Vaksin COVID-19 Menggunakan Recurrent Neural Network dan Naïve Bayes’, J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 5, no. 4, pp. 802–808, 2021, doi: 10.29207/resti.v5i4.3308.

[10] D. Normawati and S. A. Prayogi, ‘Implementasi Naïve Bayes Classifier Dan Confusion Matrix Pada Analisis Sentimen Berbasis Teks Pada Twitter’, J. Sains Komput. Inform. (J-SAKTI, vol. 5, no. 2, pp. 697–711, 2021.

[11] Y. Tan, B. Sherwood, and P. P. Shenoy, ‘A naïve Bayes regularized logistic regression estimator for low-dimensional classification’, Int. J. Approx. Reason., vol. 172, p. 109239, Sep. 2024, doi: 10.1016/j.ijar.2024.109239.

[12] A. Khan, H. Zhang, N. Boudjellal, A. Ahmad, and M. Khan, ‘Improving Sentiment Analysis in Election-Based Conversations on Twitter with ElecBERT Language Model’, Comput. Mater. Contin., vol. 76, no. 3, pp. 3345–3361, 2023, doi: 10.32604/cmc.2023.041520.

[13] G. Phillips et al., ‘Setting nutrient boundaries to protect aquatic communities: The importance of comparing observed and predicted classifications using measures derived from a confusion matrix’, Sci. Total Environ., vol. 912, p. 168872, Feb. 2024, doi: 10.1016/j.scitotenv.2023.168872.

[14] P. Arsi, R. Wahyudi, and R. Waluyo, ‘Optimasi SVM Berbasis PSO pada Analisis Sentimen Wacana Pindah Ibu Kota Indonesia’, J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 5, no. 2, pp. 231–237, 2021, doi: 10.29207/resti.v5i2.2698.

[15] R. Wahyudi and G. Kusumawardana, ‘Sentiment Analysis on the Grab Application on Google Play Store Using Support Vector Machine’, J. Inform., vol. 8, no. 2, pp. 200–207, 2021

Downloads

Published

2024-12-23

How to Cite

Sulaiman, C., Salamah, U. G., Oktaviati, R., & Faizah, S. (2024). Sentiment Analysis and Classification of Public Opinion on Prabowo Subianto Using Naïve Bayes on Twitter. Journal of Global Engineering Research and Science, 3(2), 56–62. https://doi.org/10.56904/j-gers.v3i2.98
Views
  • Abstract 75
  • PDF (English) 51