Claim Missing Document
Check
Articles

Found 1 Documents
Search

A Comparative Study of Naïve Bayes and K-Nearest Neighbors (KNN) Algorithms in Sentiment Analysis of ChatGPT Usage Among Students Syahli Kurniawan; Hidayat, Rahmad; Muhammad Reza Zulman
Journal of Applied Electrical Engineering Vol. 9 No. 2 (2025): JAEE, December 2025
Publisher : Politeknik Negeri Batam

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.30871/jaee.v9i2.11464

Abstract

This study compares the performance of the Naïve Bayes and K-Nearest Neighbors (KNN) algorithms in sentiment analysis of Lhokseumawe State Polytechnic students toward the use of ChatGPT. The comparison is conducted due to the varied results of previous research, where the effectiveness of both algorithms largely depends on the data type and context. The model was developed using 9.800 external data collected from Twitter and Google Play Store, which were processed through text preprocessing and TF-IDF transformation stages, and then tested on 237 student questionnaire data as a case study. The initial evaluation showed that Naïve Bayes achieved an accuracy of 88% with a prediction time of 0,0063 seconds, while KNN recorded an accuracy of 83% with a prediction time of 0,4760 seconds. In the student questionnaire test, Naïve Bayes again outperformed with 79,75% accuracy compared to KNN’s 49,37%.