Sentiment Analysis of Product Reviews Using LSTM - A Comparative Evaluation with Machine Learning Algorithms Employing BOW and TF-IDF Techniques
Karthiga S
Department of Computer Science and Applications, Faculty of Science and Humanities, SRM Institute of Science and Technology, Ramapuram Campus, Chennai, Tamil Nadu, India.
Department of Computer Science and Applications, Faculty of Science and Humanities, SRM Institute of Science and Technology, Ramapuram Campus, Chennai, Tamil Nadu, India.
Department of Computer Science and Applications, Faculty of Science and Humanities, SRM Institute of Science and Technology, Ramapuram Campus, Chennai, Tamil Nadu, India.
Department of Computer Science and Engineering, School of Computing, SRM Institute of Science and Technology, Tiruchirappalli Campus, Tamil Nadu, India.
Department of Computer Science and Applications, Faculty of Science and Humanities, SRM Institute of Science and Technology, Ramapuram Campus, Chennai, Tamil Nadu, India.
Sentiment analysis has become an invaluable tool in understanding consumer opinions in large datasets. This study explores sentiment analysis of the product review dataset applying different machine learning classification algorithms, specifically focusing on two primary feature extraction methods: (TF-IDF) and (BOW) A thorough comparison was conducted to assess the effectiveness of each method alone, as well as a novel hybrid technique that merges both TF-IDF and BOW. And compared with deep learning approach, our findings demonstrate that feature extraction technique significantly enhances classification performance. Among the tested algorithms, logistic regression with tfidf, bow exhibited even greater accuracy. Obtaining the most accurate results possible from the sentiment analysis is the primary objective of this endeavor. The first step in the process of analyzing and classifying the data is going to be the preprocessing of the data, followed by the extraction of features, then the categorization of sentiments via the use of machine learning algorithms, and lastly the assessment of the algorithms. The end findings indicate that the SVM classifier obtained an accuracy of 93%, the Naive Bayes classifier achieved an accuracy of 91%, the Logistic regression classifier got an accuracy of 94%, and the LSTM classifier earned an accuracy which was 93.58%. In future work may explore the integration of additional feature extraction methods with deep learning to refine and improve sentiment analysis models.
N. Raveendhran and N. Krishnan, “A novel hybrid SMOTE oversampling approach for balancing class distribution on social media text,” Bulletin of Electrical Engineering and Informatics, vol. 14, no. 1, pp. 638–646, Feb. 2025, doi: 10.11591/eei.v14i1.8380.
P. Mani, “A SIP based Soft Handoff Mechanism for Seamless Mobility in Heterogeneous Wireless Networks,” Journal of Computer and Communication Networks, pp. 52–60, Apr. 2025, doi: 10.64026/jccn/2025006.
M. A. Fauzi, “Random forest approach fo sentiment analysis in Indonesian language,” Indones. J. Electr. Eng. Comput. Sci., vol. 12, no. 1, pp. 46–50, 2018, doi: 10.11591/ijeecs.v12.i1.pp46-50.
N. Shrestha and F. Nasoz, “Deep Learning Sentiment Analysis of Amazon.Com Reviews and Ratings,” International Journal on Soft Computing, Artificial Intelligence and Applications, vol. 8, no. 1, pp. 01–15, Feb. 2019, doi: 10.5121/ijscai.2019.8101.
N. C. Dang, M. N. Moreno-García, and F. De la Prieta, “Sentiment Analysis Based on Deep Learning: A Comparative Study,” Electronics, vol. 9, no. 3, p. 483, Mar. 2020, doi: 10.3390/electronics9030483.
R. Ahuja, A. Chug, S. Kohli, S. Gupta, and P. Ahuja, “The Impact of Features Extraction on the Sentiment Analysis,” Procedia Computer Science, vol. 152, pp. 341–348, 2019, doi: 10.1016/j.procs.2019.05.008.
Agarwal, Apoorv, Boyi Xie, Ilia Vovsha, Owen Rambow, and Rebecca Passonneau. "Sentiment analysis of twitter data." In Proceedings of the workshop on languages in social media, pp. 30-38. Association for Computational Linguistics, 2011.
N. P. T, “Real Time Data and Decisions in Aarhus and Surrey Smart,” Journal of Computer and Communication Networks, pp. 33–42, Feb. 2025, doi: 10.64026/jccn/2025004.
S. A. Aljuhani and N. Saleh, “A Comparison of Sentiment Analysis Methods on Amazon Reviews of Mobile Phones,” International Journal of Advanced Computer Science and Applications, vol. 10, no. 6, 2019, doi: 10.14569/ijacsa.2019.0100678.
J. Soni and K. Mathur, “Sentiment analysis based on aspect and context fusion using attention encoder with LSTM,” International Journal of Information Technology, vol. 14, no. 7, pp. 3611–3618, May 2022, doi: 10.1007/s41870-022-00966-1.
A. S. a. A. A. a. D. P. Rathor, “Comparative study of machine learning approaches for Amazon reviews,” Procedia computer science, vol. 132, pp. 1552--1561, 2018.
S. Hochreiter, “The Vanishing Gradient Problem During Learning Recurrent Neural Nets and Problem Solutions,” International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, vol. 06, no. 02, pp. 107–116, Apr. 1998, doi: 10.1142/s0218488598000094.
A. S. Neogi, K. A. Garg, R. K. Mishra, and Y. K. Dwivedi, “Sentiment analysis and classification of Indian farmers’ protest using twitter data,” International Journal of Information Management Data Insights, vol. 1, no. 2, p. 100019, Nov. 2021, doi: 10.1016/j.jjimei.2021.100019.
M. Das, S. Kamalanathan, P. Alphonse, "A comparative study on TF-IDF feature weighting method and its analysis using unstructured dataset," CEUR Workshop Proc 2870:98–107, (2021).
S. Xiao, H. Wang, Z. Ling, L. Wang, and Z. Tang, “Sentiment Analysis For Product Reviews Based on Deep Learning,” Journal of Physics: Conference Series, vol. 1651, no. 1, p. 012103, Nov. 2020, doi: 10.1088/1742-6596/1651/1/012103.
P. Gaur, S. Vashistha, and P. Jha, “Twitter Sentiment Analysis Using Naive Bayes-Based Machine Learning Technique,” Sentiment Analysis and Deep Learning, pp. 367–376, 2023, doi: 10.1007/978-981-19-5443-6_27.
S.-W. Kim and J.-M. Gil, “Research paper classification systems based on TF-IDF and LDA schemes,” Human-centric Computing and Information Sciences, vol. 9, no. 1, Aug. 2019, doi: 10.1186/s13673-019-0192-7.
S. Alam and N. Yao, “The impact of preprocessing steps on the accuracy of machine learning algorithms in sentiment analysis,” Computational and Mathematical Organization Theory, vol. 25, no. 3, pp. 319–335, Mar. 2018, doi: 10.1007/s10588-018-9266-8.
I. Alsmadi and G. K. Hoon, “Term weighting scheme for short-text classification: Twitter corpuses,” Neural Computing and Applications, vol. 31, no. 8, pp. 3819–3831, Jan. 2018, doi: 10.1007/s00521-017-3298-8.
Y. Bao, C. Quan, L. Wang, and F. Ren, “The Role of Pre-processing in Twitter Sentiment Analysis,” Intelligent Computing Methodologies, pp. 615–624, 2014, doi: 10.1007/978-3-319-09339-0_62.
D. S. Asudani, N. K. Nagwani, and P. Singh, “Impact of word embedding models on text analytics in deep learning environment: a review,” Artificial Intelligence Review, vol. 56, no. 9, pp. 10345–10425, Feb. 2023, doi: 10.1007/s10462-023-10419-1.
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, ... & J. Vanderplas, "Scikit-learn: Machine learning in Python," Journal of machine learning research, 12(Oct), 2825-2830, (2011).
Putra Fissabil Muhammad, Retno Kusumaningrum, Adi Wibowo, "Sentiment Analysis Using Word2vec And Long Short-Term Memory (LSTM) For Indonesian Hotel Reviews," Procedia Computer Science, Volume 179, 2021.
S. Durairaj, M. M. Umar, and B. Natarajan, “Evaluation of Bio-Inspired Algorithm-based Machine Learning and Deep Learning Models,” Bio-inspired Algorithms in Machine Learning and Deep Learning for Disease Detection, pp. 48–69, Jan. 2025, doi: 10.1201/9781003538158-3.
CRediT Author Statement
The authors confirm contribution to the paper as follows:
Conceptualization: Karthiga S, Sutha K, Pavithra V, Sakthivel S, Sowmya V and Sasidevi J;
Data Curation: Karthiga S, Sutha K and Pavithra V;
Writing- Original Draft Preparation: Karthiga S, Sutha K, Pavithra V, Sakthivel S, Sowmya V and Sasidevi J;
Visualization: Karthiga S, Sutha K and Pavithra V;
Investigation: Karthiga S, Sutha K, Pavithra V, Sakthivel S, Sowmya V and Sasidevi J;
Supervision: Sakthivel S, Sowmya V and Sasidevi J;
Validation: Karthiga S, Sutha K and Pavithra V;
Writing- Reviewing and Editing:
Karthiga S, Sutha K, Pavithra V, Sakthivel S, Sowmya V and Sasidevi J; All authors reviewed the results and approved the final version of the manuscript.
Acknowledgements
The author(s) received no financial support for the research, authorship, and/or publication of this article.
Funding
No funding was received to assist with the preparation of this manuscript.
Ethics declarations
Conflict of interest
The authors have no conflicts of interest to declare that are relevant to the content of this article.
Availability of data and materials
Data sharing is not applicable to this article as no new data were created or analysed in this study.
Author information
Contributions
All authors have equal contribution in the paper and all authors have read and agreed to the published version of the manuscript.
Corresponding author
Pavithra V
Department of Computer Science and Applications, Faculty of Science and Humanities, SRM Institute of Science and Technology, Ramapuram Campus, Chennai, Tamil Nadu, India.
Open Access This article is licensed under a Creative Commons Attribution NoDerivs is a more restrictive license. It allows you to redistribute the material commercially or non-commercially but the user cannot make any changes whatsoever to the original, i.e. no derivatives of the original work. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-nd/4.0/
Cite this article
Karthiga S, Sutha K, Pavithra V, Sakthivel S, Sowmya V and Sasidevi J, “Sentiment Analysis of Product Reviews Using LSTM - A Comparative Evaluation with Machine Learning Algorithms Employing BOW and TF-IDF Techniques”, Journal of Machine and Computing, vol.5, no.3, pp. 1606-1614, July 2025, doi: 10.53759/7669/jmc202505127.