Analisis Sentimen Twitter Pengaruh Tokoh Politik dengan Menggunakan Metode K-Nearest Neighbor
Abstract
Understanding public sentiment towards political figures is crucial for gauging their influence and impact. This study employs sentiment analysis to analyze Twitter data and assess the influence of political figures. Sentiment analysis, a computational exploration of expressed opinions, emotions, and sentience, allows insights into public perception on a large scale. 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 TF-IDF weighting for keyword importance and cosine similarity calculations for comparing tweets to a labeled training dataset. By analyzing the nearest neighbors, sentiment values are assigned. The KNN model achieved an accuracy of 89%, a precision of 85%, and a recall of 88%, 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.
Keywords: Sentiment Analysis, K-Nearest Neighbor, TF-IDF, Cosine Similarity
This work is licensed under a Creative Commons Attribution 4.0 International License.
The Authors submitting a manuscript do so on the understanding that if accepted for publication, the copyright of the article shall be assigned to JNATIA (Jurnal Nasional Teknologi Informasi dan Aplikasinya) as the publisher of the journal. Copyright encompasses exclusive rights to reproduce and deliver the article in all forms and media, as well as translations. The reproduction of any part of this journal (printed or online) will be allowed only with written permission from JNATIA (Jurnal Nasional Teknologi Informasi dan Aplikasinya). The Editorial Board of JNATIA (Jurnal Nasional Teknologi Informasi dan Aplikasinya) makes every effort to ensure that no wrong or misleading data, opinions, or statements be published in the journal.
This work is licensed under a Creative Commons Attribution 4.0 International License.