Authors: Sachin Kalmani, Pratham Shinde
Abstract: Sentiment analysis has become an essential technique for extracting actionable insights from user-generated content on e-commerce platforms. This study presents a comparative analysis of machine learning and lexicon-based approaches for sentiment classification of Amazon India product reviews, where sentiment labels are derived from user star ratings. Three machine learning models — Naive Bayes, Logistic Regression, and Random Forest — are evaluated alongside two lexicon-based methods, VADER and TextBlob. Text preprocessing and feature extraction are performed using standard natural language processing (NLP) techniques combined with TF-IDF vectorization. Models are tested under four train-test split configurations (80-20, 60-40, 40-60, and 20-80) to systematically assess the effect of training data size on performance. Results show that machine learning models consistently outperform lexicon-based approaches across all evaluation metrics. At the 80-20 split, Random Forest achieves the highest accuracy of 96.22%, followed by Logistic Regression at 85.97% and Naive Bayes at 80.58%. Lexicon-based methods plateau near 73-74% accuracy across all split configurations, confirming their insensitivity to training data volume. A notable finding is that at reduced training sizes, Naive Bayes (69.65% at 20-80) underperforms both VADER (74.11%) and TextBlob (72.90%), suggesting that lexicon-based methods are more reliable when labelled training data is scarce. These findings offer practical guidance for model selection in real-world sentiment analysis applications.