Predicting 5-Star Ratings of Reviews Using Machine Learning
College:
The Dorothy and George Hennings College of Science, Mathematics, and Technology
Major:
Computer Science
Faculty Research Advisor(s):
Daehan Kwak
Abstract:
Since sentiment analysis tools often differ from the nuanced evaluations conveyed by user-provided five-star ratings, this study aims to analyze the two by comparing the sentiment between text reviews and numeric star ratings. The second objective focuses on predicting star ratings using machine learning to offer a valuable tool for products or businesses on different platforms that lack native rating systems. To conduct this study, the Yelp dataset is retrieved from the Yelp Open Dataset, which contains 7 million reviews and 150K businesses, and consists of five large files, including a file with the Yelp reviews. This file is input into a Python program that contains four state-of-the-art sentiment analysis tools: TextBlob, Vader, NRC Lexicon, and Stanza. The sentiment analysis values that are generated are then analyzed using a Python program to calculate the Pearson correlation coefficient, indicating that overall, sentiment analysis tools do not show strong correlations with star ratings.
Therefore, this study employs machine learning techniques to develop a more accurate model that will predict 5-star ratings. The large language models that are used in this study are BiLSTM (Bidirectional Long Short-Term Memory) and BERT (Bidirectional Encoder Representations from Transformers). To train these models, the Yelp reviews and their corresponding star ratings are utilized. After the machine learning models are created and their performance on the test sets is assessed, the overall accuracy is 66.54% for BiLSTM and 71.42% for BERT, indicating that the BERT model yields more accurate results than the BiLSTM model. To further this project, other machine learning techniques are used to create a better model for predicting 5-star ratings so that it can be used for products or businesses on different platforms that do not provide star ratings.