A Reproducible Evaluation Framework for TF-IDF-Based Machine Learning in Sentiment Classification
Abstract
Sentiment analysis is an important Natural Language Processing (NLP) task used to automatically identify the emotional orientation expressed in textual data. Although recent research increasingly focuses on deep learning and transformer-based language models, classical machine-learning methods combined with Term Frequency-Inverse Document Frequency (TF-IDF) remain useful because of their relatively low computational requirements and reproducibility. This paper presents a controlled evaluation framework for comparing classical machine-learning classifiers for binary sentiment classification using the Large Movie Review Dataset (IMDb). The dataset contains 50,000 labeled reviews divided into 25,000 training and 25,000 testing reviews. Logistic Regression, Multinomial Naive Bayes, and Linear Support Vector Machine are evaluated using a common preprocessing and TF-IDF pipeline. On the fixed 25,000-review test set, Linear SVM achieved the highest accuracy of 90.196% and F1-score of 90.153%, followed by Logistic Regression with 89.936% accuracy and 89.980% F1-score. Multinomial Naive Bayes achieved 87.280% accuracy and 86.933% F1-score. The results demonstrate that controlled classical-model baselines can provide strong performance while remaining computationally accessible and reproducible.