Skip to content
Review Open access

Traditional Machine Learning andDistilBERTfor Sentiment Analysis

Jul 2026 · Applied and Computational Engineering · 0 citations

Abstract

Sentiment analysis identifies opinion polarity in textual data and supports decision-making in review-rich digital environments. This study compares three approaches for binary sentiment classification on the Internet Movie Database (IMDb) movie review dataset, namely Term Frequency-Inverse Document Frequency (TF-IDF)+Naive Bayes, TF-IDF+Logistic Regression, and DistilBERT, a distilled version of Bidirectional Encoder Representations from Transformers (BERT). The comparison focuses on the performance-efficiency trade-off rather than accuracy alone. Models are evaluated by accuracy, precision, recall, F1 score, training time, and inference time under 20%, 50%, and 100% training-data settings. A representative rule-based error analysis is also conducted. Under the full training-data setting, DistilBERT achieves the highest F1 score of 0.914496, ahead of Logistic Regression at 0.883284 and Naive Bayes at 0.846688. However, relative to Logistic Regression, DistilBERT is approximately 175.69 times slower in training and 51.05 times slower in inference. DistilBERT trained with only 20% of the training data still exceeds the full-data F1 scores of both traditional baselines. The findings indicate that model selection should jointly consider effectiveness, efficiency, data scale, and error characteristics.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.