The application of k-nearest neighbors classifier for sentiment analysis of PT PLN (Persero) twitter account service quality
R Damarta, A Hidayat, Atje Setiawan Abdullah · Journal of Physics Conference Series · 2021
Abstract Social media has an important role in human life. In its implementation social media is used as a media for opinion and self-expression. One of the social media that is often used in Indonesia is Twitter. PT PLN (Persero) as a State-Owned Enterprise that is engaged in providing electricity always tries to provide optimal services. The text mining method can be used to control PT PLN (Persero) service quality by classifying Twitter data with the k-Nearest Neighbors algorithm. Text mining is used to extract information from unstructured textual data to produce useful information. Data classification is a text mining application for information retrieval. In this study the data collected will pass the preprocessing stage, using the k-Nearest Neighbors algorithm to classify data into negative, neutral, or positive classes. The data used in this study was sourced from Twitter. Data is taken from 1 December 2019 to 1 February 2020 using the Twitter API with the keyword ‘@ pln_123’. We obtained 3,000 tweet data successfully. The results are implemented in web-based applications that are built using the Python programming language. Evaluation of the k-Nearest Neighbors model produces an accuracy value of 87.41%. The classification prediction results also show that there is a tendency of the positive sentiment of 35%, the neutral sentiment of 28%, and the negative sentiment of 37%.