UNP Journal of Statistics and Data Science
Vol. 2 No. 1 (2024): UNP Journal of Statistics and Data Science

Twitter Data Sentimen Analysis 2024 Presidential Candidate Using Algorithm Naïve Bayes Classifier By Methods K-Fold Cross Validation

Aldi Prajela (Universitas Negri Padang)
Syafriandi Syafriandi (Unknown)
Dony Permana (Unknown)
Dina Fitria (Unknown)



Article Info

Publish Date
25 Feb 2024

Abstract

Indonesia implements a democratic system by involving the public in General Elections (Pemilu) for specific political positions. The active community expresses opinions on social media, especially regarding the 2024 Presidential Election (Pilpres) and respective presidential candidates, which have become trending topics on Twitter. The analysis used to absorb these tweets into information is sentimen analysis using the Naïve Bayes Classifier algorithm with the K-fold Cross-Validation method. Through the stages of pre-processing, weighting, labeling, classification using NBC, and testing using a Confusion Matrix, The results of the classification from NBC showed that Anies got 80% positive tweets and 20% negative tweets from 1186 tweets, Prabowo Subianto got 78% positive tweets and 22% negative tweets from 1149 tweets, and Ganjar Pranowo got 77% positive tweets and 23% negative tweets from 1075 tweets. Testing process was carried out using the NBC algorithm with the K-Fold Cross Validation method using values k=1 to k=10. The function of K-Fold Cross Validation is to maximize the confusion matrix result. It can be conclude that Anies Baswedan has the highest score in iteration 4, namely a precision value of 90%, a recall value of 99%, and the accurary value of 91%. Furthemore, Ganjar Pranowo had the highest score in iteration 9, namely a precision value of 95%,a recall value of 97%, and an accuracy value of 92%. Meanwhile, Prabowo Subianto had the highest score in iteration 9, namely a precision value of 97%, a recall value of 99%, and an accuracy value of 94%.

Copyrights © 2024






Journal Info

Abbrev

ujsds

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Mathematics Social Sciences

Description

UNP Journal of Statistics and Data Science is an open access journal (e-journal) launched in 2022 by Department of Statistics, Faculty of Science and Mathematics, Universitas Negeri Padang. UJSDS publishes scientific articles on various aspects related to Statistics, Data Science, and its ...