Public Sentiment Analysis on the Service Quality of PT PLN on X Using Naïve Bayes and K-Nearest Neighbor Algorithms.

Authors

  • Nurul Zahra Universitas Bhyangkara Jakarta Raya
  • Wowon Priatna Universitas Bhyangkara Jakarta Raya
  • Tyastuti Sri Lestari Universitas Bhyangkara Jakarta Raya

Keywords:

Sentiment Analysis, Naïve Bayes, K-Nearest Neighbor, PLN Service Quality

Abstract

Quality services since electricity is a primary public need. However, numerous complaints still highlight PLN’s lack of responsiveness, especially on the X platform (formerly Twitter). This study aims to analyze public sentiment toward PLN’s service quality expressed on X and compare the performance of the Naïve Bayes and K-Nearest Neighbor (KNN) algorithms in classifying sentiments into positive, negative, and neutral categories. The research employs the Knowledge Discovery in Databases (KDD) approach, involving data collection through tweet scraping using Tweet-Harvest, preprocessing (case folding, tokenizing, filtering, stemming), transformation with TF-IDF weighting, and data mining using Naïve Bayes and KNN. Evaluation through a confusion matrix shows that Naïve Bayes achieved an accuracy of 87%, outperforming KNN with an accuracy of 86%. These findings provide insights for PLN to better understand public perception and serve as a reference for future sentiment analysis research using machine learning.

References

M. S. Alrajak, I. Ernawati, and I. Nurlaili, “Analisis sentimen terhadap Pelayanan PT PLN di Jakarta pada Twitter dengan Algoritma K- Nearest Neighbor (K-NN),” Semin. Nas. Mhs. Ilmu Komput. dan Apl., vol. 1, no. 2, pp. 110–122, 2020.

F. Herlando, A. R. Dzikrillah, F. Nufairi, E. Sinduningrum, and M. Sholeh, “Analisis Perbandingan Sentiment Dan Perbincangan Netizen Terhadap Twitter Pasca Pergantian Nama,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran Inform., vol. 9, no. 1, pp. 360–367, 2024, doi: 10.29100/jipi.v9i1.4934.

A. Fitri, N. Azizah, and V. P. Ramadhan, “Komparasi Naïve Bayes dan K-NN Dalam Analisis Sentimen di Twitter Terhadap Kemenangan Paslon 02,” no. 204, pp. 228–237, 2024.

S. Syafrizal, M. Afdal, and R. Novita, “Analisis Sentimen Ulasan Aplikasi PLN Mobile Menggunakan Algoritma Naïve Bayes Classifier dan K-Nearest Neighbor,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 1, pp. 10–19, 2023, doi: 10.57152/malcom.v4i1.983.

M. Syarifuddinn, “Analisis Sentimen Opini Publik Mengenai Covid-19 Pada Twitter Menggunakan Metode Naïve Bayes Dan Knn,” INTI Nusa Mandiri, vol. 15, no. 1, pp. 23–28, 2020, doi: 10.33480/inti.v15i1.1347.

D. Jollyta, W. Ramdhan, and M. Zarlis, KONSEP DATA MINING DAN PENERAPAN. 2020.

A. Zanuardi and H. Suprayitno, “Analisa Karakteristik Kecelakaan Lalu Lintas di Jalan Ahmad Yani Surabaya melalui Pendekatan Knowledge Discovery in Database,” J. Manejemen Aset Infrastruktur Fasilitas, vol. 2, no. 1, pp. 45–55, 2018, doi: 10.12962/j26151847.v2i1.3767.

WowonPriatna, EkaNurA’ini, JoniWarta, AgusHidayat, TyastutiSriLestari, and Rasim, “Sentiment Analysis of Bjorka Hacker Using the Naive Bayes and C.45 Algorithms,” 2023.

Gading Viewieanti Eka Nur Fazriah, “Analisis Sentimen Pengguna Twitter Terhadap Pemakai Gadget Pada Anak Usia Dini Menggunakan Metode Support Vector Machine (SVM) dan Naive Bayes,” 2024.

Trias Handayanto and H. Herlawati, DATA MINING DAN MACHINE LEARNING MENGGUNAKAN MATLAB DAN PYTHON. 2020.

M. K. Amril Mutoi Siregar, S.Kom. and M. K. Adam Puspabhuana, S.Kom., DATA MINING. CV Kekata Group, 2017.

Endrik, A. Nugroho, and A. T. Zy, “Penerapan Algoritma Naive Bayes dan PSO pada Analisis Sentimen Kandidat Calon Presiden 2024,” Remik Ris. dan E-Jurnal Manaj. Inform. Komput., vol. 7, no. 3, pp. 1367–1380, 2023.

Downloads

Published

25-02-2026

How to Cite

Zahra, N., Priatna, W., & Lestari, T. S. (2026). Public Sentiment Analysis on the Service Quality of PT PLN on X Using Naïve Bayes and K-Nearest Neighbor Algorithms. International Journal of Information Technology and Computer Science Applications, 4(1), 11–20. Retrieved from https://ejurnal.jejaringppm.org/index.php/jitcsa/article/view/212

Issue

Section

New Submission

Most read articles by the same author(s)