Klasifikasi Sentimen Masyarakat di Twitter terhadap Ganjar Pranowo dengan Metode K-Nearest Neighbor

Authors

DOI:

https://doi.org/10.36085/jsai.v6i2.5414

Abstract

There are many types of social media to gather information, share information and share news, one of which is Twitter. In this study, sentiment-based classification is carried out in two categories, namely positive and negative, by applying the k-Nearest Neighbor method to the figure of the governor of Central Java, Mr. Ganjar Pranowo. K-Nearest Neighbor is a method of classifying objects based on training data that uses the smallest distance or similarity from the object. At the learning stage, this algorithm stores only characteristic vectors and classifies the learning data. During the classification stage, the same features are calculated for the test data, the class of which is unknown. The distance from this new vector to the training data vector is calculated and the next K is taken. This study aims to obtain the value of accuracy using 4,000 data with negative and positive sentiment, each of which amounted to 2,000. After the tweet data is successfully retrieved from Twitter, the data is still raw and requires a preprocessing stage to produce clean data and ready for processing at a later stage. Calculation of the value of accuracy by classifying public sentiment on Twitter against Ganjar Pranowo using the K-Nearest Neighbor method in testing accuracy produces a pretty good accuracy value of 81% precision 81% recall 81%.

Downloads

Published

2023-06-30

Issue

Section

Articles
Abstract viewed = 118 times