Tang, Yiwen (2025) Comparative Analysis of CNN and LSTM Neural Networks for Sentiment Classification on the Sentiment140 Dataset. International Journal of Innovative Science and Research Technology, 10 (7): 25jul1564. pp. 2602-2606. ISSN 2456-2165
Text sentiment analysis is of great help in mental health diagnosis. It can identify problems in early stages and actively intervene to prevent them from becoming serious. This study explores the application of deep learning techniques for sentiment analysis aimed at assessing mental health through text. In this paper, I use PyTorch to create a convolutional neural network (CNN) and a long short-term memory network (LSTM) and train these two neural networks based on the processed Sentiment140 dataset. Test Accuracy, Recall, F1 score, Total loss, and Training time to evaluate their performance. With a Test Accuracy of 87.42% as opposed to 81.25% for CNN, the results demonstrate that the LSTM model performs better than CNN across all evaluation metrics. Finally, I develop a web interface that enables users to enter text and receive sentiment analysis result based on trained LSTM model. This research can help improve mental health diagnosis and monitoring.
Altmetric Metrics
Dimensions Matrics
Downloads
Downloads per month over past year
![]() |