Analisis Sentimen X Terhadap Pemilihan Presiden Indonesia 2024 dengan Metode K-Nearest Neighbor

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.

Authors

Institutions

Publication Details

Journal
Journal of Computer System and Informatics (JoSYC)
Published
2024-08-30
DOI
https://doi.org/10.47065/josyc.v5i4.5802
Primary Topic
Data Mining and Machine Learning Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Analisis Sentimen X Terhadap Pemilihan Presiden Indonesia 2024 dengan Metode K-Nearest Neighbor

Tri Allan Siddiq, Muhammad Ikhsan
3 links
Journal of Computer System and Informatics (JoSYC)
Data Mining and Machine Learning Applications
article

Analisis Sentimen X Terhadap Pemilihan Presiden Indonesia 2024 dengan Metode K-Nearest Neighbor

Tri Allan Siddiq, Muhammad Ikhsan
article en

Abstract

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.

Journal of Computer System and Informatics (JoSYC)Vol. 5(4)
Universitas Islam Negeri Sumatera Utara (ID)
Openalex Percentile: Top 51%
Data Mining and Machine Learning Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.