Sentiment Analysis and Classification of Product Reviews: A Comprehensive Study Using NLP and Machine Learning Techniques
Adarsh Godia, L. K. Tiwari · 2024
The main objective of this research is to analyze the sentiments expressed in customer reviews of Flipkart products using machine learning algorithms. In this paper, we conducted an investigation, into sentiment analysis and classification of product reviews using Natural Language Processing (NLP) and Machine Learning (ML) techniques. The study involves steps such, as preprocessing the data analyzing n-grams and applying Term Frequency-Inverse Document Frequency (TF-IDF) vectorization to extract features from the text data. This research aims to address challenges related to imbalanced classes by incorporating the Synthetic Minority Stratified Sampling Technique (SMOTE) in analysis. We utilized a dataset of customer reviews. Applied Logistic Regression, Decision Tree, K-Nearest Neighbour (KNN) and Naïve Bayes algorithms to develop a sentiment analysis model and determine which one performed better. We assessed the accuracy of these classifiers using 10-fold cross-validation. Among the performing classifiers, we further fine-tuned their Hyperparameters. Evaluated their performance using various metrics including accuracy, precision, recall, and F1 score.