Analisis Sentimen Twitter Pengaruh Tokoh Politik dengan Menggunakan Metode K-Nearest Neighbor

Authors

  • I Made Surya Adi Palguna Universitas Udayana Author
  • Ngurah Agus Sanjaya ER Universitas Udayana Author

DOI:

https://doi.org/10.24843/JNATIA.2024.v02.i02.p25

Keywords:

Sentiment Analysis, K-Nearest Neighbor, TF-IDF, Confusion Matrix

Abstract

Public opinion towards political figures can consist of positive and negative sentiments. Besides that, social media has developed which can be used as a forum for public opinion, one of which is Twitter. From this public opinion, sentiment analysis is formed which uses a classification algorithm. This work leverages the K-Nearest Neighbor (KNN) algorithm, which classifies data based on its similarity to existing data points. Tweets undergo preprocessing, followed by TFIDF weighting for keyword importance and confusion matrix calculations for calculate the evaluation of algorithm. By analyzing the nearest neighbors, sentiment values are assigned. The KNN model achieved an accuracy of 84,06% for k = 5, precision of 86,70% for k = 5, recall of 95,89% for k = 7, and F1-score of 90,93% for k = 5, demonstrating its effectiveness in assessing sentiment and influence through Twitter data. This research contributes to the field of political communication by offering a robust method for analyzing public opinion and gauging the influence of political figures on social media platforms. 

Downloads

Published

2024-02-02

How to Cite

[1]
I Made Surya Adi Palguna and Ngurah Agus Sanjaya ER, “Analisis Sentimen Twitter Pengaruh Tokoh Politik dengan Menggunakan Metode K-Nearest Neighbor”, Jnatia, vol. 2, no. 2, pp. 443–448, Feb. 2024, doi: 10.24843/JNATIA.2024.v02.i02.p25.

Most read articles by the same author(s)

1 2 > >> 

Similar Articles

1-10 of 115

You may also start an advanced similarity search for this article.