Comparative Analysis of Naïve Bayes and K-Nearest Neighbor for Lexicon-Based Emotion Classification of Paxel App User Reviews - Salsabilah, Azka; Vitianingsih, Anik Vega; Cahyono, Dwi; Lidya Maukar, Anastasia; Zangana, Hewa Majeed (JOURNAL OF INFORMATICS AND TELECOMMUNICATION ENGINEERING, 2026)
The rapid growth of app-based delivery services has increased the importance of understanding user emotions as an indicator of service quality. User reviews on digital platforms provide valuable insights into customer perceptions, satisfaction levels, and service-related issues. This study aims to compare the performance of Naïve Bayes and K-Nearest Neighbor (KNN) algorithms in classifying user emotions related to the Paxel application. The dataset was collected from Google Play Store and X (Twitter) using web scraping techniques and subsequently processed through text pre-processing stages, including case folding, tokenization, and stopword removal. Emotion labels were assigned using the NRC Indonesian Emotion Lexicon, while feature extraction was performed using the TF-IDF method. To address class imbalance, the Synthetic Minority Oversampling Technique (SMOTE) was applied prior to model training. Experimental results show that the Naïve Bayes model achieved the highest overall accuracy of 90.83% with a weighted F1-score of 0.90, while the KNN model obtained an accuracy of 81.21% and a weighted F1-score of 0.77. Both models performed well in identifying happy, sad, and neutral emotions, whereas anger remained the most challenging class to classify. Overall, Naïve Bayes demonstrated more consistent and reliable performance for sentiment analysis tasks..