Sentiment Analysis of Prabowo Subianto as 2024 Presidential Candidate on Twitter Using K-Nearest Neighbor Algorithm

Authors

  • Aurumnisva Faturrahmi Universitas Negeri Padang
  • Zamahsary Martha
  • Yenni Kurniawati
  • Fadhilah Fitri

DOI:

https://doi.org/10.24036/ujsds/vol1-iss5/101

Keywords:

K-Nearest Neighbor, Prabowo, Sentiment, Term Frequency-Inverse Document Frequency, Twitter

Abstract

The presidential election is one of the most talked topics at this moment. Based on many surveys, Prabowo Subianto is one of the strongest candidates for the upcoming 2024 presidential election. This research aims to see how the public sentiment towards Prabowo Subianto as the presidential candidate tends to be positive or negative. Sentiment classification was conducted using the K-Nearest Neighbor (KNN) algorithm. This algorithm classifies sentiment based on the k value of the nearest neighbor. This analysis was conducted in several stages such as data collection, text preprocessing, data labelling, data classification using the KNN algorithm, and evaluating the accuracy of the model in classifying sentiment. In this research, the results of the sentiment classification were 2731 positive sentiments and 76 negative sentiments. Where the accuracy rate produced by the model using the value of k = 3 on the division of training data and testing data of 80:20 is 97,33%.

Published

2023-11-30

How to Cite

Aurumnisva Faturrahmi, Zamahsary Martha, Yenni Kurniawati, & Fadhilah Fitri. (2023). Sentiment Analysis of Prabowo Subianto as 2024 Presidential Candidate on Twitter Using K-Nearest Neighbor Algorithm. UNP Journal of Statistics and Data Science, 1(5), 385–391. https://doi.org/10.24036/ujsds/vol1-iss5/101

Most read articles by the same author(s)

1 2 3 4 5 > >>