PELS (Procedia of Engineering and Life Science)
Vol 4 (2023): Proceedings of the 6th Seminar Nasional Sains 2023

Sentiment Analysis Before Presidential Election 2024 Using Naïve Bayes Classifier Based On Public Opinion In Twitter

Prasetyo, Heri (Unknown)
Fitrani, Arif Senja (Unknown)



Article Info

Publish Date
14 Jul 2023

Abstract

This study aims to determine the performance of the Naïve Bayes Classifier algorithm and sentiment analysis tested on a dataset obtained from Twitter social media scrapping with the topic of 2024 presidential candidates. Three candidates frequently discussed in public spaces were used as keyword parameters in data mining: #anis, #ganjar, and #pilpres2024, resulting in 3021 tweets extracted from 12/1/2022 to 31/1/2023, which were successfully converted to ".csv" format documents. Public opinions extracted from the dataset were then pre-processed using the Python programming language, resulting in 2157 cleaned tweets. The data that passed the pre-processing stage was then labeled as positive or negative sentiment. Sentiment analysis was performed using the Naïve Bayes Classifier algorithm with three testing experiments using different training and testing data compositions in each experiment. The results of the study showed that the best Naïve Bayes model was obtained in the first experiment with a 10% testing data and 90% training data composition, resulting in 71% accuracy, 93% precision, 66% recall, and an f-measure score of 77%. The conclusion of the study is that the electability of the 2024 presidential candidates shapes public opinion and generates public sentiment in the form of positive and negative tweets. Positive tweets had a higher percentage of 71.5% (1543), while negative sentiment tweets accounted for 28.5% (614). Further research is expected to produce different information by using different classification algorithms and larger data sets.

Copyrights © 2023






Journal Info

Abbrev

PELS

Publisher

Subject

Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Engineering

Description

PELS (Procedia of Engineering and Life Science) is an international journal published by Faculty of Science and Technology Universitas Muhammadiyah Sidoarjo. The research article submitted to this online journal will be double blind peer-reviewed (Both reviewer and author remain anonymous to each ...