ANALYSIS OF PUBLIC SENTIMENT TOWARDS 2024 PRESIDENTIAL CANDIDACY USING NAÏVE BAYES ALGORITHM

Authors

  • Rianggi
  • Nanang Ruhyana Universitas Nusa Mandiri
(*) Corresponding Author

DOI:

https://doi.org/10.34288/jri.v7i1.356

Keywords:

sentiment analysis, text mining, Naive Bayes, presidential nomination, social media

Abstract

This study analyzes public sentiment towards presidential nominations using text mining techniques and machine learning. The dataset consists of 670 tweets collected from social media. The analysis process includes a data pre-processing phase, encompassing text cleaning, case folding, tokenization, stopword removal, and stemming using the Sastrawi library for the Indonesian language. Sentiment labeling was was performed using NLTK's SentimentIntensityAnalyzer, categorizing tweets into positive, negative, or neutral sentiments. The analysis results reveal the sentiment distribution among the analyzed tweets. Data modeling was performed using the Naive Bayes algorithm, which achieved an accuracy of 97.78% on the Iris dataset as an implementation example. The confusion matrix and classification report demonstrate the model's excellent performance in distinguishing sentiment classes. This research provides insights into public opinion regarding presidential nominations and demonstrates the effectiveness of text mining techniques and machine learning in sentiment analysis. The method can be applied to understand public opinion trends in other political and social contexts

Downloads

Download data is not yet available.

References

Journal of Multidisciplinary Analisis Sentimen Berbasis Naïve Bayes Pada Media Sosial Twitter Terhadap Hasil Pemilu Indonesia 2024. IJM: Indonesian Journal of Multidisciplinary, 2. https://journal.csspublishing/index.php/ijm

Putri Nardilasari, A., Lia Hananto, A., Shofia Hilabi, S., & Priyatna, B. (2023). Analisis Sentimen Calon Presiden 2024 Menggunakan Algoritma SVM Pada Media Sosial Twitter (Vol. 7, Issue 1).

Subowo, M. H., & Alzami, F. (2024). Using 2024 election twitter data, sentiment analysis based on TF-IDF and Naïve Bayes.

Vindua, R., & Zailani, A. U. (2023). Analisis Sentimen Pemilu Indonesia Tahun 2024 Dari Media Sosial Twitter Menggunakan Python.

Yin, H., Yang, S., & Li, J. (2020). Detecting Topic and Sentiment Dynamics Due to COVID-19 Pandemic Using Social Media. http://arxiv.org/abs/2007.02304

Yudha Patria, W., Harry Gunawan, P., & Aquarini, N. (2025). Public Political Sentiment Post 2024 Presidential Election: Comparison of Naïve Bayes and Support Vector Machine. Technology and Science (BITS), 6(4). https://doi.org/10.47065/bits.v6i4.6734

Yusuf Ramadhan Nasution, Suhardi Suhardi, & Ilham Hafiz Satrio. (2024). Penerapan Algoritma Klasifikasi Naïve Bayes Untuk Analisis Sentimen Tentang Pemilu 2024. Elkom: Jurnal Elektronika Dan Komputer, 17(2), 495–502. https://doi.org/10.51903/elkom.v17i2.2053

Downloads

Published

2024-12-15

How to Cite

Rianggi, & Ruhyana, N. (2024). ANALYSIS OF PUBLIC SENTIMENT TOWARDS 2024 PRESIDENTIAL CANDIDACY USING NAÏVE BAYES ALGORITHM. Jurnal Riset Informatika, 7(1), 21–30. https://doi.org/10.34288/jri.v7i1.356