Sentiment Analysis of Text Data Using Machine Learning Techniques
DOI:
https://doi.org/10.62643/Abstract
Automated sentiment classification of usergenerated text is constrained not only by classifier choice but by the interaction between sparse text representation and model inductive bias. This paper presents a reproducible sentiment-analysis framework that converts unstructured text into weighted lexical features using Term Frequency– Inverse Document Frequency (TF-IDF) vectorization and classifies sentiment with a Random Forest (RF) ensemble. The pipeline comprises text cleaning, tokenization, stopword removal, lemmatization, TF-IDF extraction with unigram–bigram features and sublinear term-frequency scaling, and Random Forest classification with balanced class weighting. Experiments are conducted on three benchmark domains: movie reviews (IMDb/MR), product reviews (Amazon), and Twitter-style messages. Performance is measured using accuracy, macro-averaged precision, recall, F1-score, and confusion matrices, with Naïve Bayes, Logistic Regression, and Linear SVM as baselines under the same feature space. Results position TFIDF–RF as a strong but domain-dependent performer: it is competitive with linear baselines on binary and wellseparated tasks, and it uniquely provides Gini featureimportance scores that expose which lexical cues drive predictions. Confusion-matrix analysis shows that the principal error source across all classifiers is the neutral class, which is consistently the most difficult category. The paper reports the full system architecture, vectorizer and classifier configurations, data-splitting protocol, and evaluation procedure so that the work can be reproduced and extended.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.













