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
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.
Logistic Regression, GridSearchCV, Text Classification, Machine Learning, TF-IDF, Sentiment Analysis
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.