Sentiment analysis of user reviews using various types of models

Read full text Summarise with VIRAT
Authors: Χαράλαμπος Π. Λουκίδης
Cited by: 0
References: 25

Summary

No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.

Summarise with VIRAT Free to try with your Science Catalogs account.

Abstract

This thesis presents a comprehensive comparative study of six machine learning algorithms for binary sentiment classification.We examine five classical algorithms (Naive Bayes, Logistic Regression, Support Vector Machines with RBF kernel, Random Forest [5], k-Nearest Neighbors) and one modern deep learning model based on transformer architecture (BERT -Bidirectional Encoder Representations from Transformers).Experiments were conducted on the NLTK Movie Reviews dataset containing 2,000 movie reviews evenly distributed between positive and negative sentiment.For classical algorithms, preprocessing included tokenization, stop word removal with negation preservation, lemmatization, and TF-IDF [11] feature extraction (5,000 features, unigrams + bigrams).For BERT, we fine-tuned the pre-trained bert-base-uncased model on the dataset.Results revealed significant performance differences.Random Forest [5] achieved the highest accuracy among classical models (87.00%, 0.8700 F1), followed by SVM (86.25%, 0.8625 F1) and Logistic Regression (86.00%, 0.8600 F1).Naive Bayes showed good performance (83.25%) with remarkably low computational cost, while KNN significantly underperformed (70.25%) despite extensive hyperparameter tuning.Contrary to expectations, BERT exhibited the worst performance (55.25% accuracy, 0.4734 F1-score) with severe overfitting to the negative class (94.0%recall for negative but only 16.5% for positive).Computational cost was also significantly higher (32 minutes training, 67.5 seconds inference), and the transformer underperformed on the smaller dataset in our experiments, consistent with the need for larger datasets to leverage its capacity effectively.The thesis concludes that for this dataset size (2,000 samples), classical algorithms with TF-IDF features significantly outperform transformer-based models.Algorithm selection depends on requirements: Random Forest [5] for maximum accuracy, Logistic Regression for real-time Institutional Repository -Library & Information Centre -University of Thessaly 26/03/2026 09:13:34 EET -149.20.245.246applications, Naive Bayes for resource-constrained systems, and BERT only when much larger datasets are available (>20K samples).

Fields of Study & Subjects

Sentiment Analysis and Opinion Mining Topic Modeling Text and Document Classification Technologies

Publication details

Journal / source
University of Thessaly Institutional Repository (University of Thessaly)
Publication date
1 January 2026
Language
EL
Document type
Thesis