Afril Efan Pajri
Universitas Nahdlatul Ulama Sunan Giri Bojonegoro (UNUGIRI)

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Comparison of the Performance of K-Nearest Neighbor and Naive Bayes Algorithms for Sentiment Analysis of PinjamYuk Application User Reviews Using SMOTE and TF-IDF Lindya Rossita Handoko; Amelia Faza; Mula Agung Barata; Afril Efan Pajri
Journal of Applied Informatics and Computing Vol. 10 No. 4 (2026): August 2026
Publisher : Politeknik Negeri Batam

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.30871/jaic.v10i4.13398

Abstract

The growth of online lending services has driven the increasing adoption of digital financial applications, providing users with convenient access to financial services. This growing number of users has generated a large volume of reviews on the Google Play Store, which can serve as a valuable source for understanding users’ perspectives on the benefits and performance of these applications. This study aims to compare the performance of the K-Nearest Neighbor (KNN) and Naive Bayes algorithms in classifying the sentiment of user reviews of the PinjamYuk application. The study uses a secondary dataset obtained from Kaggle, consisting of 500 user reviews of the PinjamYuk application on the Google Play Store during the 2023–2024 period. The reviews were categorized into three sentiment classes: positive, neutral, and negative, based on their rating scores. Because the class distribution in the dataset was imbalanced, the Synthetic Minority Oversampling Technique (SMOTE) was applied to balance the classes before the classification process. The research procedure included data preprocessing, feature extraction using Term Frequency–Inverse Document Frequency (TF-IDF), data balancing using SMOTE, and KNN parameter optimization using GridSearchCV. The models were evaluated using accuracy, precision, recall, F1-score, confusion matrix, stratified K-fold cross-validation, and the McNemar test. The results show that the Naive Bayes algorithm outperformed KNN. The stratified K-fold cross-validation results yielded an average accuracy of 81.0% for Naive Bayes and 80.8% for KNN. Furthermore, the McNemar test produced a p-value of 0.014 (p < 0.05), indicating that the performance difference between the two algorithms was statistically significant. These findings demonstrate that the Naive Bayes algorithm is more effective for analyzing user sentiment in reviews of the PinjamYuk application.