Sentimen Analysis of Twitter Reviews by Using Machine Learning Classifiers

NeuroQuantology · 2023

Sentiment analysis of social media reviews has become a popular research topic in recent years.In this paper, we explore the effectiveness of machine learning classifiers for sentiment analysis of Twitter reviews.We collected a dataset of 10,000 tweets containing product reviews, and manually annotated them with their sentiment labels (positive, negative, or neutral).We then trained and evaluated six different machine learning classifiers, including Naive Bayes, Support Vector Machines (SVM), Random Forests, K-Nearest Neighbors (KNN), Decision Trees, and Logistic Regression.We used a variety of feature extraction techniques, including bag-of-words, n-grams, and word embeddings.Our results show that SVM achieved the highest accuracy of 85.4%, followed by Random Forests with 83.7% accuracy.Naive Bayes and Logistic Regression achieved similar accuracies of 80.2% and 80.1%, respectively.KNN and Decision Trees had the lowest accuracies of 73.5% and 71.8%, respectively.We also performed a detailed analysis of the classification results, including precision, recall, and F1score for each sentiment label.Our findings suggest that SVM is the most effective classifier for sentiment analysis of Twitter reviews, and that using word embeddings as features can improve classification performance.Overall, our study provides valuable insights into the performance of machine learning classifiers for sentiment analysis of Twitter reviews, and can be useful for researchers and practitioners in the field of natural language processing and social media analysis.

Read the paper · More papers on PaperTik