Analysis of Public Sentiment Using The K-Nearest Neighbor (k-NN) Algorithm and Lexicon Based on Indonesian Television Shows on Social Media Twitter

Khodijah Hulliyah, Achmad Maulana Almaisah, Fitri Mintarsih, Siti Ummi Masrurah, Dewi Suci Khairani, Saepul Aripiyanto · 2022 10th International Conference on Cyber and IT Service Management (CITSM) · 2022

This study aims to implement a combination of the k-Nearest Neighbor (k-NN) and Lexicon Based algorithms in the case of sentiment analysis of public responses about Indonesian television shows uploaded on Twitter with 3 sentiment classes, namely positive, negative and neutral. The chosen method is a combination classification method between k-Nearest Neighbor (k-NN) and Lexicon Based. Before classifying, the pre-processing stage of this study was carried out first including cleaning, case folding, tokenizing, normalization, stopword removal and stemming. Then weighting is carried out by the TF-IDF method. The dataset used amounted to 200 tweets taken from tweet mentions of 4 Indonesian television stations namely, TVRI, RCTI, SCTV and ANTV. The program is designed using the python programming language with the help of the jupyter notebook framework. The scenario is carried out using the value of$k$in the k-NN algorithm of$k=1,\ k=3$and$k=5$. The best results obtained were$k=3$values with an accuracy of 74%, an error rate of 26%, a recall of 83.3%, a precision of 80.64% and$f$-results at a value of$\mathrm{k}=5$amounting to 90%.

Read the paper · More papers on PaperTik