A Comparative Study of Classical Machine Learning Models for Sentiment Classification on the IMDb Benchmark

Sentiment classification of movie reviews is one of the oldest benchmark tasks in natural language processing, and classical linear models over TF-IDF features remain the standard baselines against which newer methods are judged. This study compares four classical machine learning models, logistic regression, multinomial naive Bayes, complement naive Bayes and a linear support vector machine, on the IMDb benchmark of 50,000 movie reviews (25,000 training and 25,000 held-out test reviews), using an identical preprocessing and feature pipeline for every model. The project's existing TF-IDF + logistic regression baseline was first reproduced exactly (test accuracy 0.8992, ROC AUC 0.9629). Logistic regression was also the best of the four models on the held-out test set, ahead of the linear SVM (0.8913) and the two naive Bayes variants (0.8682). Multinomial and complement naive Bayes produced identical predictions on all 25,000 test reviews, which we show is a mathematical consequence of the two-class, balanced design rather than an implementation error. A TF-IDF configuration study found that adding word bigrams is worth about 1.1-1.6 percentage points of accuracy, while enlarging the vocabulary from 20,000 to 50,000 features adds at most 0.6 points; the best configuration overall (logistic regression, unigrams + bigrams, 50,000 features) reached 0.8998. Five-fold cross-validation on the training set placed logistic regression (0.8956 ± 0.0035) and the linear SVM (0.8958 ± 0.0049) in a statistical tie, so the test-set gap between them should be read as small. An error analysis of the best model shows that accuracy is nearly flat across review-length bands (0.896-0.903) and that errors are concentrated in the low-confidence region: 45.7% of all misclassifications were made with confidence below 0.60, and only 1.8% with confidence of 0.90 or more. The results confirm that, a decade after the benchmark appeared, a well-configured linear model remains within roughly one percentage point of the practical ceiling of the classical approach on this task, and that feature design (bigrams) matters more than the choice among the standard linear classifiers. Code and data: https://github.com/rashedrana/imdb-sentiment-analysis

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-30
DOI
https://doi.org/10.5281/zenodo.24679719
Primary Topic
Sentiment Analysis and Opinion Mining
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A Comparative Study of Classical Machine Learning Models for Sentiment Classification on the IMDb Benchmark

Rashed Rana
Zenodo (CERN European Organization for Nuclear Research)
Sentiment Analysis and Opinion Mining
preprint

A Comparative Study of Classical Machine Learning Models for Sentiment Classification on the IMDb Benchmark

Rashed Rana
preprint en

Abstract

Sentiment classification of movie reviews is one of the oldest benchmark tasks in natural language processing, and classical linear models over TF-IDF features remain the standard baselines against which newer methods are judged. This study compares four classical machine learning models, logistic regression, multinomial naive Bayes, complement naive Bayes and a linear support vector machine, on the IMDb benchmark of 50,000 movie reviews (25,000 training and 25,000 held-out test reviews), using an identical preprocessing and feature pipeline for every model. The project's existing TF-IDF + logistic regression baseline was first reproduced exactly (test accuracy 0.8992, ROC AUC 0.9629). Logistic regression was also the best of the four models on the held-out test set, ahead of the linear SVM (0.8913) and the two naive Bayes variants (0.8682). Multinomial and complement naive Bayes produced identical predictions on all 25,000 test reviews, which we show is a mathematical consequence of the two-class, balanced design rather than an implementation error. A TF-IDF configuration study found that adding word bigrams is worth about 1.1-1.6 percentage points of accuracy, while enlarging the vocabulary from 20,000 to 50,000 features adds at most 0.6 points; the best configuration overall (logistic regression, unigrams + bigrams, 50,000 features) reached 0.8998. Five-fold cross-validation on the training set placed logistic regression (0.8956 ± 0.0035) and the linear SVM (0.8958 ± 0.0049) in a statistical tie, so the test-set gap between them should be read as small. An error analysis of the best model shows that accuracy is nearly flat across review-length bands (0.896-0.903) and that errors are concentrated in the low-confidence region: 45.7% of all misclassifications were made with confidence below 0.60, and only 1.8% with confidence of 0.90 or more. The results confirm that, a decade after the benchmark appeared, a well-configured linear model remains within roughly one percentage point of the practical ceiling of the classical approach on this task, and that feature design (bigrams) matters more than the choice among the standard linear classifiers. Code and data: https://github.com/rashedrana/imdb-sentiment-analysis

Zenodo (CERN European Organization for Nuclear Research)
Ostbayerische Technische Hochschule Amberg-Weiden (DE)
Sentiment Analysis and Opinion Mining
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon