Public Sentiment Analysis on the 2024 Presidential Election Using Naive Bayes Classifier (NBC) and Support Vector Machine (SVM) On Social Media Data
Keywords:
2024 Presidential Election, Sentiment Analysis, Naive Bayes Classifier, Support Vector Machine, YouTube, Social MediaAbstract
This study aims to evaluate the effectiveness of the Naive Bayes Classifier (NBC) and Support Vector Machine (SVM) in analyzing public sentiment from YouTube comments related to the 2024 Indonesian Presidential Election. A total of 1,800 comments, collected from November 2023 to March 2024, were analyzed to test these models. The results show that SVM, with the highest accuracy of 76.33% and precision and F1-Score of 75.29% and 72.67% on the 10% test data, outperformed NBC, which recorded a highest accuracy of 72.19% under similar conditions. These findings highlight the importance of using more sophisticated methods in sentiment analysis to understand the complex and diverse dynamics of public opinion. This study provides valuable insights for stakeholders in developing effective communication strategies and offers a foundation for advancing sentiment analysis methodologies in political contexts.
References
Alexander, Nyongki, R. Bria, & A. Witanti. (2023). Analisis sentimen masyarakat Indonesia menggunakan algoritma support vector machine tentang Pilpres 2024 (Vol. 7).
Alfonso, M., & Rarasati, D. B. (n.d.). Sentiment analysis of 2024 presidential candidates election using SVM algorithm. JISA (Jurnal Informatika dan Sains).
Anam, M. K., Fitri, T. A., Agustin, A., Lusiana, L., Firdaus, M. B., & Nurhuda, A. T. (2023). Sentiment analysis for online learning using the lexicon-based method and the support vector machine algorithm. ILKOM Jurnal Ilmiah, 15(2), 290–302. https://doi.org/10.33096/ilkom.v15i2.1590.290-302
Ansori, Y., & Holle, K. F. H. (2022). Perbandingan metode machine learning dalam analisis sentimen Twitter. Jurnal Sistem dan Teknologi Informasi (JustIN), 10(4), 429. https://doi.org/10.26418/justin.v10i4.51784
Azzawagama Firdaus, A., Yudhana, A., & Riadi, I. (2024). Prediction of Indonesian presidential election results using sentiment analysis with naïve Bayes method. https://doi.org/10.30865/mib.v8i1.7007
Bustomi, Y., Nugraha, A., Juliane, C., & Rahayu, S. (2023). Data mining selection of prospective government employees with employment agreements using Naive Bayes classifier. Sinkron, 8(1), 1–8. https://doi.org/10.33395/sinkron.v8i1.11968
Christian, Y., Wibowo, T., & Lyawati, M. (2024). Sentiment analysis by using naïve Bayes classification and support vector machine: Study case Sea Bank. Sinkron, 9(1), 258–275. https://doi.org/10.33395/sinkron.v9i1.13141
Damayanti, L., & Lhaksmana, K. M. (2024). Sentiment analysis of the 2024 Indonesia presidential election on Twitter. Jurnal Penelitian Teknik Informatika, 8(2). https://doi.org/10.33395/v8i2.13379
Fadlila Nurwanda, W., Sulandari, W., Susanti, Y., & Reyhana, Z. (2023). Comparative analysis of performance levels of SVM and naïve Bayes algorithm for lifestyle classification on Twitter social media. International Conference on Digital Advance Tourism, Management and Technology, 1(1), 215–230. https://doi.org/10.56910/ictmt.v1i1.65
Firdaus, A. A., Yudhana, A., Riadi, I., & Mahsun. (2024). Indonesian presidential election sentiment: Dataset of response public before 2024. Data in Brief, 52. https://doi.org/10.1016/j.dib.2023.109993
Geni, L., Yulianti, E., & Sensuse, D. I. (2023). Sentiment analysis of tweets before the 2024 elections in Indonesia using IndoBERT language models. JITEKI, 9(3), 746–757. https://doi.org/10.26555/jiteki.v9i3.26490
Haryanto, B., Ruldeviyani, Y., Rohman, F., Dimas, T. N. J., Magdalena, R., & Yasil, F. M. (2019). Facebook analysis of community sentiment on 2019 Indonesian presidential candidates from Facebook opinion data. In Procedia Computer Science (Vol. 161, pp. 715–722). Elsevier.
Imam, M., & Informatika, S. (2023). Sentimen analisis pada media sosial menggunakan metode Naive Bayes classifier (NBC) (Vol. 3).
Madjid, M. F., Ratnawati, D. E., & Rahayudi, B. (2023). Sentiment analysis on app reviews using support vector machine and naïve Bayes classification. Sinkron, 8(1), 556–562. https://doi.org/10.33395/sinkron.v8i1.12161
Manullang, O., Prianto, C., & Harani, N. H. (2023). Analisis sentimen untuk memprediksi hasil calon pemilu presiden menggunakan lexicon based dan random forest.
Padri, R., Asro, A., & Indra, I. (2023). Classification of traffic congestion in Indonesia using the Naive Bayes classification method. Journal of World Science, 2(6), 877–888. https://doi.org/10.58344/jws.v2i6.285
Rosyida, T., Putro, H. P., & Wahyono, H. (2024). Analisis sentimen terhadap Pilpres 2024 berdasarkan opini dari Twitter menggunakan naïve Bayes dan SVM. Teknokris.
Saifullah Fattah, F., & Ratnasari, C. I. (2023). Sentiment analysis of Indonesian presidential candidate 2024 on Facebook (Vol. 7).
Saputra, P. Y., Subhi, D. H., Zain, F., & Winatama, A. (2019). Implementasi sentimen analisis komentar channel video pelayanan pemerintah di YouTube menggunakan algoritma naïve Bayes. Jurnal Informatika Polinema, 5.
Setiawan, R., & Dewi, F. (2023). Analysis of Twitter user sentiment on presidential candidate Anies Baswedan using naïve Bayes algorithm. ILKOM Jurnal Ilmiah, 15(3), 473–487. https://doi.org/10.33096/ilkom.v15i3.1775.473-487
Silalahi, W., & Hartanto, A. (2023). Klasifikasi sentimen support vector machine berbasis optimasi menyambut Pemilu 2024. JRST (Jurnal Riset Sains dan Teknologi), 7(2), 245. https://doi.org/10.30595/jrst.v7i2.18133
Tohidi, E., Herdiansyah, R. P., & Wahyudin, E. (2024). Analisa sentimen komentar video YouTube di channel TVOneNews tentang calon presiden Prabowo Subianto menggunakan support vector machine (Vol. 8).






