Sentiment Analysis on Reviews of Amazon Products Using Different Machine Learning Algorithms
摘要
There are thousands of products with hundreds of reviews on major e-commerce sites such as Amazon and eBay. Customers often browse through positive and negative reviews before making a purchase decision. Reading hundreds of reviews for a single product can be time-consuming and overwhelming for customers. Sentiment analysis approach has been identified to address this issue. The study aspires to use several machine learning algorithms to do sentiment analysis on Amazon product reviews. For this purpose, supervised learning, online learning, and ensemble learning algorithms have been applied to Amazon product reviews obtained from the Kaggle database. Natural language processing and data mining techniques were applied to the dataset. Firstly, natural language processing techniques were applied for data preprocessing. The dataset was separated into 20% for testing and 80% for training. Term Frequency-Inverse Document Frequency (TF-IDF) vectorization was employed to create word vectors. Passive Aggressive (PA), Support Vector Machine (SVM), Random Forest (RF), AdaBoost, K-Nearest Neighbor (KNN), and XGBoost algorithms were employed in model implementation, which was the crucial step. Accuracy rates, cross-validation scores, confusion matrices, and classification report results were compared. The Random Forest algorithm provided the highest accuracy rate with a prediction accuracy of 96.13%.