Sentiment Analysis of Restaurant Reviews Using Machine Learning Algorithms
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.
Related articles
Related articles are currently not available for this article.