Public Political Sentiment Post 2024 Presidential Election: Comparison of Naïve Bayes and Support Vector Machine


  • Widya Yudha Patria * Mail Telkom University, Bandung, Indonesia
  • Putu Harry Gunawan Telkom University, Bandung, Indonesia
  • Narita Aquarini Université de Poitiers, Poitiers, France
  • (*) Corresponding Author
Keywords: Naïve Bayes Classifier; Support Vector Machines; 2024 Presidential Election results; X; Dataset; TF-IDF; Sentiment Classification

Abstract

One nation with a democratic political system is Indonesia. The public is able to express themselves freely. The public's use of social media is expanding quickly, particularly among users of platform ‘X’. The now trending tweets concern the 2024 presidential election. The reaction to the results of the 2024 presidential election has ranged from positive to negative to neutral. Large numbers of tweets can be used as a source of information to do their sentiments analysis. It is possible to know if people, in general, are satisfied or unsatisfied with the outcome of the presidential election thanks to the emotion categorization. This study aims to analyze public sentiment regarding the election result utilizing machine learning methods which will provide insights into public opinion that can be useful in political strategy as well as in public discourse assessment. In this paper, we will compare the Naïve Bayes Classifier (NBC) and the Support Vector Machine (SVM) algorithms for tweet classification of platform ‘X’ sentiment. This study presents the performed data analysis on 2193 data points (from platform X) that have been classified into neutral, positive, and negative categories using the Naive Bayes Classifier (NBC) and Support Vector Machine (SVM) techniques. Balancing SMOTE is used to address data imbalance, and TF-IDF is applied for feature extraction. Results depicts that Naïve Bayes Classifier (NBC) gives an accuracy of 62.41% whereas Support Vector Machine (SVM) gives 62.19% accuracy. This accuracy on these creations demonstrates how able models can be when classifying varying public sentiments between political events, highlighting the abilities, but also weaknesses of such efforts in sentiment classification. This paper contributes to the further development of sentiment analysis by providing an assessment of how effective these algorithms are, and by stressing the need for unbalance data treatment on research utilizing social media.

Downloads

Download data is not yet available.

References

A. Krämling, B. Geißel, J. R. Rinne, and L. Paulus, “Direct democracy and equality: A global perspective,” International Political Science Review, vol. 44, no. 4, 2023, doi: 10.1177/01925121211058660.

A. Ligthart, C. Catal, and B. Tekinerdogan, “Systematic reviews in sentiment analysis: a tertiary study,” Artif Intell Rev, vol. 54, no. 7, 2021, doi: 10.1007/s10462-021-09973-3.

Y. Findawati, U. Indahyanti, Y. Rahmawati, and R. Puspitasari, “Sentiment Analysis of Potential Presidential Candidates 2024: A Twitter-Based Study,” Academia Open, vol. 8, no. 1, 2023, doi: 10.21070/acopen.8.2023.7138.

D. R. Wulandari, M. A. Murti, and T. S. P. Hilman Fauzi, “Sentiment Analysis Based on Text About President Candidate 2024 in Indonesia Using Artificial Intelligence with Parameter Optimization Algorithm,” in Proceedings of 2023 IEEE International Conference on Internet of Things and Intelligence Systems, IoTaIS 2023, 2023. doi: 10.1109/IoTaIS60147.2023.10346038.

C. U. Huh and H. W. Park, “Setting the Public Sentiment: Examining the Relationship between Social Media and News Sentiments,” Systems, vol. 12, no. 3, 2024, doi: 10.3390/systems12030105.

C. Dewi, R. C. Chen, H. J. Christanto, and F. Cauteruccio, “Multinomial Naïve Bayes Classifier for Sentiment Analysis of Internet Movie Database,” Vietnam Journal of Computer Science, vol. 10, no. 4, 2023, doi: 10.1142/S2196888823500100.

D. F. Sengkey, A. Jacobus, and F. J. Manoppo, “Effects of kernels and the proportion of training data on the accuracy of svm sentiment analysis in lecturer evaluation,” IAES International Journal of Artificial Intelligence, vol. 9, no. 4, 2020, doi: 10.11591/ijai.v9.i4.pp734-743.

A. Addiga and S. Bagui, “Sentiment Analysis on Twitter Data Using Term Frequency-Inverse Document Frequency,” Journal of Computer and Communications, vol. 10, no. 08, 2022, doi: 10.4236/jcc.2022.108008.

F. S. Khurniawan and Y. Ruldeviyani, “Twitter Sentiment Analysis: Case Study on the Revision of the Indonesia’s Corruption Eradication Commission (KPK) Law 2019,” in 2020 International Conference on Data Science and Its Applications, ICoDSA 2020, 2020. doi: 10.1109/ICoDSA50139.2020.9212851.

A. Mustolih, P. Arsi, and P. Subarkah, “Sentiment Analysis Motorku X Using Applications Naive Bayes Classifier Method,” Indonesian Journal of Artificial Intelligence and Data Mining, vol. 6, no. 2, 2023, doi: 10.24014/ijaidm.v6i2.24864.

H. Mustakim and S. Priyanta, “Aspect-Based Sentiment Analysis of KAI Access Reviews Using NBC and SVM,” IJCCS (Indonesian Journal of Computing and Cybernetics Systems), vol. 16, no. 2, 2022, doi: 10.22146/ijccs.68903.

G. A. Sandag, E. H. E. Soegiarto, L. Laoh, A. Gunawan, and D. Sondakh, “Sentiment Analysis of Government Policy Regarding PPKM on Twitter Using LSTM,” in 2022 4th International Conference on Cybernetics and Intelligent System, ICORIS 2022, 2022. doi: 10.1109/ICORIS56080.2022.10031474.

I. Imelda and Arief Ramdhan Kurnianto, “Naïve Bayes and TF-IDF for Sentiment Analysis of the Covid-19 Booster Vaccine,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 7, no. 1, 2023, doi: 10.29207/resti.v7i1.4467.

H. Liu, X. Chen, and X. Liu, “A Study of the Application of Weight Distributing Method Combining Sentiment Dictionary and TF-IDF for Text Sentiment Analysis,” IEEE Access, vol. 10, 2022, doi: 10.1109/ACCESS.2022.3160172.

M. Mahdikhani, “Predicting the popularity of tweets by analyzing public opinion and emotions in different stages of Covid-19 pandemic,” International Journal of Information Management Data Insights, vol. 2, no. 1, 2022, doi: 10.1016/j.jjimei.2021.100053.

J. Piskorski and G. Jacquet, “TF-IDF Character N-grams versus Word Embedding-based Models for Fine-grained Event Classification: A Preliminary Study,” Proceedings of the Workshop on Automated Extraction of Socio-political Events from News 2020, no. May, 2020.

M. B. Ressan and R. F. Hassan, “Naïve-Bayes family for sentiment analysis during COVID-19 pandemic and classification tweets,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 28, no. 1, 2022, doi: 10.11591/ijeecs.v28.i1.pp375-383.

A. K. Chakraborty, D. Das, and A. K. Kolya, “Sentiment Analysis on Large-Scale Covid-19 Tweets using Hybrid Convolutional LSTM Based on Naïve Bayes Sentiment Modeling,” ECTI Transactions on Computer and Information Technology, vol. 17, no. 3, 2023, doi: 10.37936/ecti-cit.2023173.252549.

J. Ramsingh and V. Bhuvaneswari, “An efficient Map Reduce-Based Hybrid NBC-TFIDF algorithm to mine the public sentiment on diabetes mellitus – A big data approach,” Journal of King Saud University - Computer and Information Sciences, vol. 33, no. 8, 2021, doi: 10.1016/j.jksuci.2018.06.011.

S. Chatterjee et al., “Fault detection of a Li-ion battery using SVM based machine learning and unscented Kalman filter,” in Materials Today: Proceedings, 2023. doi: 10.1016/j.matpr.2022.10.279.

M. Isnan, G. N. Elwirehardja, and B. Pardamean, “Sentiment Analysis for TikTok Review Using VADER Sentiment and SVM Model,” in Procedia Computer Science, 2023. doi: 10.1016/j.procs.2023.10.514.

H. Bao, S. Wu, Z. Wu, G. Kang, X. Peng, and P. J. Withers, “A machine-learning fatigue life prediction approach of additively manufactured metals,” Eng Fract Mech, vol. 242, 2021, doi: 10.1016/j.engfracmech.2020.107508.

N. G. Ramadhan, “Comparative Analysis of ADASYN-SVM and SMOTE-SVM Methods on the Detection of Type 2 Diabetes Mellitus,” Scientific Journal of Informatics, vol. 8, no. 2, 2021, doi: 10.15294/sji.v8i2.32484.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Public Political Sentiment Post 2024 Presidential Election: Comparison of Naïve Bayes and Support Vector Machine

Dimensions Badge
Article History
Submitted: 2025-01-14
Published: 2025-03-01
Abstract View: 18 times
PDF Download: 9 times
How to Cite
Patria, W., Gunawan, P., & Aquarini, N. (2025). Public Political Sentiment Post 2024 Presidential Election: Comparison of Naïve Bayes and Support Vector Machine. Building of Informatics, Technology and Science (BITS), 6(4), 2270-2277. https://doi.org/10.47065/bits.v6i4.6734
Issue
Section
Articles