Analisis Sentimen X Terhadap Pemilihan Presiden Indonesia 2024 dengan Metode K-Nearest Neighbor - Siddiq, Tri Allan; Ikhsan, Muhammad (Forum Kerjasama Pendidikan Tinggi (FKPT), 2024)
The presidential election which will take place in 2024, sentiment analysis is carried out to determine the tendency of a person's opinion towards an event or problem, whether it tends to be positive or negative. The purpose of this study is to apply the K-Nearest Neighbor Algorithm to the classification of public opinion on the 2024 presidential election and produce a classification of the application of the K-Nearest Neighbor algorithm method to public opinion on the 2024 presidential election on social media X. Based on the results of the research that has been done, it can be concluded that sentiment analysis using the K-Nearest Neighbor (KNN) method has proven effective in identifying and understanding public sentiment related to the 2024 Indonesian presidential election. The community's response to the phenomenon of trends and public opinion towards prospective presidential candidates in 2024 is considered to show a positive attitude, as illustrated in sentiment analysis using a lexicon dictionary. Of the approximately 1,000 tweets that have been analyzed, 211 of them show a positive sentiment, 175 express a negative sentiment, while the other 614 express a Neutral sentiment. This data was collected from November 28, 2023 to April 28, 2024. In addition, this study also identified words that frequently appear in Indonesian tweets. In K-Nearest Neighbor (KNN), the results obtained by the accuracy of the use training set get an accuracy of 100%, precision of 100%, recall of 100% and f-measure of 100%, 10-fold cross validation obtained get an accuracy of 92.5%, precision of 100% recall of 91% and f-measure of 94%, and the last 80% percentage split get an accuracy of 88.55%, precision of 100%, recall of 87% and f-measure of 93.04%. The K-Nearest Neighbor (K-NN) algorithm classification method using 80% percentage split testing is very good in classification testing has greater accuracy, precision, recall and f-measure compared to 10-fold cross validation testing.