Performance Analysis of Machine Learning and Deep Learning for Sentiment Analysis
摘要
Sentiment analysis is the classification of text to determine the polarity of the text as positive, negative, and neutral. This study examines how well machine learning and deep learning models do for sentiment analysis on a given dataset. Conventional machine learning algorithms, including support vector machines (SVM), random forest, gradient boosting, and naive Bayes, are compared with deep learning architectures, namely long short-term memory (LSTM) and bidirectional LSTM (BiLSTM). The findings indicate that deep learning models consistently outperform typical machine learning algorithms in terms of accuracy, with long short-term memory LSTM and BiLSTM attaining accuracies in the 90 s, while machine learning algorithms achieve accuracies in the 80 s like gradient boosting 71.56%, random forest 75.05%, SVM 80.56%, naive Bayes 71.37%, LSTM 89.81%, and Bi-LSTM 90.65%. This gap is attributed to the higher capacity of deep learning models to grasp intricate patterns and interconnections in sequential data, as well as their flexibility in handling extensive datasets.