Sentiment Analysis of Restaurant Reviews Using Machine Learning Algorithms
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
This study conducts a comparative analysis of traditional and ensemble machine learning techniques for classifying sentiments in restaurant reviews. Utilizing a carefully selected dataset of customer feedback marked as either positive (Liked) or negative, we establish a reproducible process that encompasses text preprocessing (regex, converting to lowercase), stopword elimination (while retaining negations), stemming, and two feature extraction methods (Bag-of-Words and TF-IDF). We train and assess five classifiers: Gaussian Naive Bayes, Logistic Regression, Support Vector Machine (SVM), Random Forest, and XGBoost. The evaluation metrics include accuracy, precision, recall, F1-score, and confusion matrices, with robustness tested through cross-validation. This research underscores the balance between model complexity, computational demands, and classification effectiveness, offering visualization and an interactive prediction tool for practical use. Our contributions include (1) a thorough comparison of feature extraction techniques and classifiers on restaurant review data, (2) a comprehensive, reproducible codebase and evaluation framework, and (3) insights into model selection for business applications like automated feedback analysis and customer experience monitoring.