Nonlinear Engineering (Jul 2025)

Advanced sentiment analysis in online shopping: Implementing LSTM models analyzing E-commerce user sentiments

  • Lu Liyuan

DOI
https://doi.org/10.1515/nleng-2025-0110
Journal volume & issue
Vol. 14, no. 1
pp. 100790 – 51

Abstract

Read online

This study addresses the accuracy challenges in e-commerce sentiment classification and thus provides valuable insight for businesses to enrich strategies toward the interpretation of customer feedback and improvement of product development. This article elaborately contrasts long short-term memory (LSTM)-based models with traditional machine learning models, like support vector machines (SVM), random forest, and Naive Bayes classifiers. The authors have used a large dataset of customer reviews from famous e-commerce websites, pre-processed for noise reduction and standardization of the input. Our LSTM models were implemented using state-of-the-art deep learning frameworks, with special consideration while performing hyperparameter tuning. The results showed that the bidirectional LSTM model had the best performance of 92.1% in accuracy, 91.8% in precision, 92.0% in recall, and an F1-score of 91.9%. In comparison, traditional machine learning approaches gave accuracies: 86.5% for SVM, 85.1% for random forest, and 82% for Naive Bayes. Hyperparameter tuning returned the best configurations for the LSTM models: 128 LSTM units, a dropout of 0.3, with learning rates 0.001 for LSTM and 0.0001 for bidirectional LSTM. These optimizations contributed hugely to the performance improvements observed in these models. Error analysis gave insights into the challenges that the models faced. Sarcasm and irony accounted for 22% of the classification errors, while mixed sentiment accounted for 18%, and implicit accounted for 15%. To sum up, this research has shown the efficiency of LSTM models on e-commerce user review sentiment analysis, especially bidirectional LSTM. These models show a much better result in sentiment classification compared to traditional machine learning techniques, which proves them to have huge potential for improving the accuracy of the task in real-world applications.

Keywords