Comparison of the Naive Bayes and Logistic Regression Methods in Sentiment Analysis of Restaurant Reviews in Yogyakarta
DOI:
https://doi.org/10.62411/tc.v25i4.18237Abstract
The increasing number of customer reviews on Google Maps provides valuable information regarding customer perceptions of restaurant services. However, the large volume of textual reviews makes manual analysis inefficient. This study aims to compare the performance of Multinomial Naive Bayes and Logistic Regression algorithms in classifying the sentiment of restaurant reviews in Yogyakarta. The dataset used is the Yogyakarta F&B Reviews dataset obtained from Kaggle, consisting of 13,332 reviews containing review text and star ratings. The review text was first cleaned through text preprocessing. Since the dataset does not provide sentiment labels, sentiment labeling was then performed using a lexicon-based approach by comparing positive and negative words in the preprocessed review text, with star ratings used as supporting information. The labeled data were subsequently transformed using Term Frequency-Inverse Document Frequency (TF-IDF) feature extraction. The dataset was divided into training and testing data using an 80:20 ratio, and stratified 10-fold cross-validation was applied to assess the stability of the results. The classification performance was evaluated using accuracy, precision, recall, F1-score, and confusion matrix, and the performance differences were tested using a paired t-test, the Wilcoxon signed-rank test, and the McNemar test. The results showed that on the 80:20 split, Multinomial Naive Bayes achieved an accuracy of 85.98%, while Logistic Regression achieved a higher accuracy of 89.95%. Logistic Regression also obtained higher overall precision, recall, and F1-score than Multinomial Naive Bayes. Cross-validation confirmed this result, with mean accuracies of 87.64% and 91.21%, respectively, and the difference was statistically significant (p < 0.01 in all tests). Logistic Regression was also more resilient to class imbalance, achieving a negative-class recall of 0.44 compared with 0.15 for Naive Bayes. Therefore, Logistic Regression demonstrated better overall performance for classifying positive and negative sentiments in the Yogyakarta restaurant review dataset. Keywords – Sentiment Analysis, Naïve Bayes, Logistic Regression, TF-IDF, Google Maps Reviews, Cross-Validation.Downloads
Published
Issue
Section
License
Copyright (c) 2026 Mis Atika Nur Azizah, Bambang Ismanto, Wahyu Setianto

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
License Terms
All articles published in Techno.COM Journal are licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0). This means:
1. Attribution
Readers and users are free to:
-
Share – Copy and redistribute the material in any medium or format.
-
Adapt – Remix, transform, and build upon the material.
As long as proper credit is given to the original work by citing the author(s) and the journal.
2. Non-Commercial Use
-
The material cannot be used for commercial purposes.
-
Commercial use includes selling the content, using it in commercial advertising, or integrating it into products/services for profit.
3. Rights of Authors
-
Authors retain copyright and grant Techno.COM Journal the right to publish the article.
-
Authors can distribute their work (e.g., in institutional repositories or personal websites) with proper acknowledgment of the journal.
4. No Additional Restrictions
-
The journal cannot apply legal terms or technological measures that restrict others from using the material in ways allowed by the license.
5. Disclaimer
-
The journal is not responsible for how the published content is used by third parties.
-
The opinions expressed in the articles are solely those of the authors.
For more details, visit the Creative Commons License Page:
? https://creativecommons.org/licenses/by-nc/4.0/









