Covid-19 Sentiment Analysis on X (formerly Twitter) Using Machine Learning Classifiers: Performance Comparison and Key Insights
The current generation and widely used platforms like X (formerly Twitter) enable the study of public attitudes toward important topics, including the COVID-19 outbreak. In this paper, machine learning approaches (ML) are employed to build a sentiment analysis system for COVID-19 hashtagged tweets....
Saved in:
Published in | VFAST Transactions on Software Engineering Vol. 13; no. 2; pp. 13 - 27 |
---|---|
Main Authors | , , , , , |
Format | Journal Article |
Language | English |
Published |
03.05.2025
|
Online Access | Get full text |
ISSN | 2411-6246 2309-3978 |
DOI | 10.21015/vtse.v13i2.2103 |
Cover
Loading…
Summary: | The current generation and widely used platforms like X (formerly Twitter) enable the study of public attitudes toward important topics, including the COVID-19 outbreak. In this paper, machine learning approaches (ML) are employed to build a sentiment analysis system for COVID-19 hashtagged tweets. We employed four ML classifiers, namely Naïve Bayes (NB), Support Vector Machine (SVM), Decision Tree (DT), and Random Forest (RF), to classify the tweets into positive, negative, and neutral sentiments. In total, the examined dataset includes 178,240 tweets that are related to COVID-19 and were preprocessed through natural language processing. To assess the performance of the classifiers, we used accuracy, precision and recall, and F1 score. The results show that the DT classifier has the highest accuracy of 94% when compared to other models concerning precision and recall. Undersampling and oversampling were the techniques examined for addressing the issue of class imbalance. Such findings imply that ML, especially the SVM and DTs, can be useful in the next large-scale public sentiment analysis during a pandemic. Among the recommendations for further enhancements of the sentiment analysis approaches and their use in monitoring people’s reactions to social media during the pandemic are included in the paper. |
---|---|
ISSN: | 2411-6246 2309-3978 |
DOI: | 10.21015/vtse.v13i2.2103 |