A TF-IDF and logistic regression baseline for binary sentiment classification of short texts
The rapid growth of social media has created a large amount of short-text data that expresses people's feelings and opinions on many topics; therefore, sentiment classification has become a popular problem to address. This paper focuses on binary sentiment classification using the Sentiment 140 dataset of 1.6 million labeled tweets. A preprocessing pipeline, which includes text normalization, URL removal, and noise cleaning, was applied to the original dataset. Text representation was conducted using term frequency-inverse document frequency with an n-gram model. Logistic Regression algorithm was used for classification. The paper includes experimental evaluations using common metrics, such as accuracy, precision, recall, F1-score, ROC-AUC, the confusion matrix, and the precision-recall graph. Results show that the combination of TF-IDF feature extraction and a Logistic Regression classifier produced consistent results and achieved a computationally inexpensive baseline classifier with 85.2% accuracy, 0.852 F1-score, and 0.93 ROC-AUC when performing the Sentiment140 binary classification task. These results strongly suggest that traditional machine learning algorithms can still provide highly accurate models for such a large-scale classification challenge. Despite this, the current model has limitations in understanding sarcasm and linguistic idioms, suggesting an opportunity for deep learning and transformer-based models to outperform.
Authors
- Salam Abdulkhaleq Noaman (ORCID: https://orcid.org/0000-0002-3646-9201)
- Mustafa Ali Mohsin
Institutions
- University of Diyala (IQ)
Publication Details
- Journal
- Future Technology
- Published
- 2026-11-08
- DOI
- https://doi.org/10.55670/fpll.futech.5.4.13
- Citations
- 1
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 1.42