Application of the K-Nearest Neighbor Algorithm Method to Analyze Netizen Responses and Reactions Toward the Relocation of Capital City at social media - Ziaul Haq, Muhammad; Sri Wahyuningsih, Suluh; Nursalim; Nuryanto, Uli Wildan; Rachman, Andy (Jurnal Informasi dan Teknologi, 2023)
Sentiment analysis is a form of natural language processing that uses word analysis to ascertain people's thoughts, feelings, and views on a certain topic. In this study, word processing refers to the procedure used to categorize written texts into positive and negative emotion categories. Using data crawling techniques, information on public comments on the relocation of Indonesia's capital was gathered from Twitter social media. Keywords related to the move included "new capital," "moving capital," and "moving capital with 10,000 comments." The author of this work classified test data and training data using a lexical approach using the K-Nearest Neighbor (K-NN) method. The purpose of this study is to evaluate the K-NN algorithm's accuracy, error rate, precision, f-measure, and recall. In order to identify the ideal parameters, tests were also conducted on calculating the k value in the K-Nearest Neighbor (K-NN) method. Testing the K-Nearest Neighbor (K-NN) method yielded the greatest accuracy level of 60% with a k value of 9, concluding with the initial data collection. The K-Nearest Neighbor (K-NN) technique was evaluated in the second data collection, and with a k value of 5, it had the best accuracy level of 70%. Future scholars might create texts in languages other than Indonesian and categorize those that include visuals in them. Next, add more dictionaries to the collection and extract features from bigrams, trigrams, quadgrams, and other combinations. You may then employ several algorithmic techniques in the accuracy calculation feature.