Abstract

Twitter sentiment analysis has numerous applications in social media monitoring, brand management, customer service, political analysis, and more. By analysing the sentiment of tweets, businesses can gain insights into customer behaviour, improve customer engagement, and enhance brand reputation. In the following paper, based on many factors including id, location, target, and text, we suggest using machine learning as a method to examine the sentiment of a number of tweets. We use different algorithms such as Random Forest, Naive Bayes, logistic regression and K-nearest neighbours, Gradient Boosting Classifier, Support Vector Machine(SVM), Decision Tree Classifier, Bagging Classifier, Ada Boosting classifier, gradient boosting classifier to train and test our model on a dataset of 1000 tweets with positive and negative sentiments. A comparison of the classifiers' performance is made using measures for accuracy, precision, recall, and Fl-score. We find that logistic regression and SVM algorithms achieve the highest of the accuracy which is 58% and Fl-score of 0.62 for logistic regression and 0.57 for SVM. We come to the conclusion that our machine learning strategy can offer a trustworthy and effective tool for sentiment analysis of tweets.

Keywords:
Artificial intelligence Naive Bayes classifier Computer science Machine learning Support vector machine Sentiment analysis Random forest Logistic regression Classifier (UML) Boosting (machine learning) Social media Gradient boosting Decision tree Reputation Statistical classification World Wide Web

Metrics

5
Cited By
1.28
FWCI (Field Weighted Citation Impact)
25
Refs
0.81
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Sentiment Analysis and Opinion Mining
Physical Sciences →  Computer Science →  Artificial Intelligence
Advanced Text Analysis Techniques
Physical Sciences →  Computer Science →  Artificial Intelligence
Spam and Phishing Detection
Physical Sciences →  Computer Science →  Information Systems
© 2026 ScienceGate Book Chapters — All rights reserved.