Comparative Performance Analysis of Selected Machine Learning Techniques for Social Media Sentiment Analysis

Samuel Adegbite Oladipupo, Stephen Olatunde Olabiyisi, Wasiu Oladimeji Ismaila, Adebayo Olalere Oyedele, Oluwatobi Joel Toyobo · International Journal of Research and Innovation in Applied Science · 2025

Social media sentiment analysis plays a crucial role in understanding public opinion and user behavior across platforms. Several techniques have been developed to accurately classify sentiment in social media data. However, these techniques have not been adequately analyzed and compared. Hence, this study investigates the comparative performance of Support Vector Machine (SVM), Logistic Regression (LR) and Long Short-Term Memory (LSTM) in social media sentiment analysis. Social media data which contains labelled tweet representing different sentiments (positive, negative, neutral) were extracted from Kaggle.com using Kagglejson tool to facilitate supervised learning tasks. The preprocessing steps involved text normalization, tokenization, stopword removal, and feature extraction using TF-IDF with top 5,000 features selected. Next, the three machine learning models – SVM, LR and LSTM were implemented and trained with the preprocessed dataset. Finally, the models were implemented in python, evaluated and compared based on accuracy, precision, recall and F1 score. The results of the evaluation and comparison indicate that SVM achieved 85% accuracy, 82% precision, 84% recall and 83% F1-score: LR achieved 83% accuracy, 81% precision, 80% recall and 80% F1-score while LSTM achieved 90% accuracy, 88% precision, 89% recall and 89% F1-score The results demonstrated that LSTM outperformed SVM and LR in terms of accuracy, precision, recall and F1-score highlighting its superior capability in managing imbalanced datasets. LSTM is hereby recommended for social media analysis; this finding underscore the efficiency of LSTM addressing the challenging task in the field of sentiment classification.

Read the paper · More papers on PaperTik