Hybrid TF-IDF and Logistic Regression Model for Sentiment Analysis of Tweets

Authors: Akshay Kumar Mandal1, Radha Krishna Jana2, Akash Yadav3, Anubhaw Gupta4

1,2,3,4 Department of Computer Science and Engineering, JIS University, Kolkata, India

akshaycodex@gmail.com, radhakrishna.jana@jisuniversity.ac.in, aky21062002yadav@gmail.com, anubhawgupta664@gmail.com

Published in: Journal of Computer Science and Engineering in Innovations and Research (ISSN No: 3049-1762 online)

Publication Date: June 15, 2026

Pages: 35–40

📄 Abstract

People across the globe are deeply engaged in social networks, expressing opinions and reacting to events in real time. Analyzing these vast textual streams requires efficient and robust computational algorithms. In this study, we propose a hybrid sentiment analysis framework combining Term Frequency-Inverse Document Frequency (TF-IDF) feature weighting with hyperparameter-tuned Logistic Regression via GridSearchCV. The model demonstrates high classification accuracy, fast convergence, and effective handling of high-dimensional textual feature representations.

🔑 Keywords

Logistic Regression, GridSearchCV, Text Classification, Machine Learning, TF-IDF, Sentiment Analysis

I. Introduction

Social media users share opinions, comments, and sentiments across various online communities, creating interconnected networks of discourse. Understanding the sentiment dynamics within these networks is essential for businesses, governance, and public health monitoring [1,2].

While deep learning methods achieve competitive performance on NLP tasks, linear models such as Logistic Regression paired with TF-IDF vectorization offer exceptional computational efficiency, interpretability, and robust performance on sparse text data. This research implements a systematic pipeline incorporating text normalization, n-gram TF-IDF vectorization, and GridSearchCV optimization to determine optimal regularization parameters for tweet sentiment classification.