The Indonesian government implemented a policy of increasing the cost of Hajj in 2023, but the policy has attracted many positive and negative comments among the public. Public comments are taken from the social media network Twitter, because it contains a lot of information so that it attracts the interest of most people. With the increase in Hajj costs in 2023, it is necessary to conduct sentiment analysis. This study uses the K-Neearest Neighbor method because it is easy to apply and the data used are divided into two classes, positive and negative. The results of research on the application of the K-Nearest Neighbor method in sentiment analysis of the increase in Hajj costs in 2023 using 3,000 data taken from Twitter comments. The tweet data used, there were 1866 positive comments and 415 negative comments and the total net data of 2281, judging from the amount of positive data compared to negative data, obtained an accuracy value of 81.17% in 70:30 data sharing, 79.87% in 80:20 data sharing, 77.73% in 90:10 data sharing. Meanwhile, the highest accuracy value was 81.17% with 82.48% precision, 97.67% recall, F1- Score 89.43%. In this study, there were more positive responses, this proves that the increase in Hajj costs in 2023 using the K-Nearest Neighbor (KNN) method can be accepted by the community
Copyrights © 2023