Analisis Sentimen Terhadap Sebuah Figur Publik di Twitter Menggunakan Metode K-Nearest Neighbor - Yenggi Putra Dinata; Yusra; Fikry, Muhammad; Yanto, Febi; Cynthia, Eka Pandu (KLIK: Kajian Ilmiah Informatika dan Komputer, 2024)
The development of online media, particularly through social media platforms like Twitter, has created a vast stage for various activities, including political campaigns and public opinion on public figures. When information technology advances rapidly, public opinion can be conveyed without time constraints through social media. Twitter, with its character limitations and the use of hashtags by users, is considered easier to gather information about existing opinions and sentiments. Currently, social media is widely used for communication and making friends, but also for other activities. Advertising products, buying and selling anything, including advertising political parties and campaigning for members of Congress or presidential candidates. This research focuses on sentiment analysis towards Puan Maharani, the Speaker of the Indonesian House of Representatives (DPR RI), using data from the social media platform Twitter. Twitter, as a platform that allows users to express opinions in a concise format, is used as the main source of information in this research. The K-Nearest Neighbor algorithm for sentiment analysis technique is utilized to classify individual tweets into positive or negative categories regarding views on Puan Maharani. The methods used in this research include data crawling, labeling, and data preprocessing, which involve case folding, cleaning, tokenizing, negation handling, normalization, stopword removal, and stemming. For the classification process, the K-Nearest Neighbor method, feature weighting (TF-IDF), and feature selection (thresholding) are employed, with a threshold value of 0.001. The data used comprises 9,000 tweets in the Indonesian language. The results of the testing conducted in the K-Nearest Neighbor method, using confusion matrices, with 6 different values of K (3, 5, 7, 9, 11, 13), with comparison mechanisms of 90:10, 80:20, and 70:30 achieved the highest accuracy of 90.00% with K = 11 from the comparison using the 90:10 ratio