Machine Learning-based Sentiment Analysis of Twitter Data on the Russia-Ukraine Conflict 

Gopal D. Upadhye1, Email

Shital P. Dongre1

Jyoti Kanjalkar2

Sheetal Phantangare3

Rakhi Bhardwaj3 

Rohit Gurav1

1Department of Artificial Intelligence and Data Science, Vishwakarma Institute of Technology, Pune, Maharashtra, 411037, India 
2Department of CSE(Artificial Intelligence and Machine Learning), Vishwakarma Institute of Technology, Pune, Maharashtra, 411037, India
3Department of Computer Engineering, Vishwakarma Institute of Technology, Pune, Maharashtra, 411037, India

 

Abstract

The Russia-Ukraine conflict has emerged as a focal point of global discourse, with Twitter serving as a significant platform for real-time public sentiment ex- pression. In this study, sentiment analysis techniques applied to Twitter data regarding the Russia-Ukraine conflict are explored, with machine learning models employed to derive insights. This study compares the efficacy of Bag-of-Word and term frequency-inverse document frequency (TFIDF) feature engineering strategies using a bespoke dataset of 87,547 tweets and a regular Kaggle dataset of 43,398 tweets. Accuracy, precision, recall, and F1 score measures are used to assess seven machine learning models: gradient descent classifier, stochastic decision forest classifier, binary split classifier, margin maximization classifier, probability distribution classifier, and sigmoid regression classifier. The analysis reveals TF-IDF, particularly in conjunction with the decision tree classifier, as a promising approach for sentiment analysis on Twitter concerning the Russia-Ukraine conflict. These findings contribute to understanding sentiment dynamics and provide valuable insights for future research in this domain.