A COMPARATIVE STUDY OF MACHINE LEARNING TECHNIQUES FOR SENTIMENT CLASSIFICATION OF SOCIAL MEDIA TEXT
Abstract
Social media platforms generate vast volumes of opinionated text, making automated sentiment classification a core task in natural language processing. One high-stakes application is the analysis of public opinion on India's National Education Policy 2020 (NEP-2020), which has sustained online debate through its fifth anniversary in 2025 and whose comments need classifiers of well-understood accuracy, cost, and robustness. This study compares eight machine learning techniques, spanning classical classifiers (multinomial Naïve Bayes, logistic regression, support vector machines, and random forests), neural architectures (convolutional and bidirectional LSTM networks), and pre-trained transformers (BERT and RoBERTa), on a three-class Twitter sentiment benchmark (TweetEval) that serves as a controlled proxy for NEP-2020 public comments. Models were evaluated using accuracy, macro-averaged F1, training cost, and sensitivity to training-set size. The dataset is documented in detail, including a marked shift in class distribution between training and test partitions, and a preprocessing ablation examines how text normalization choices affect each model family. Paired significance tests with multiple-comparison correction assess whether observed differences exceed seed-to-seed and test-sampling variability. Transformer models achieved the strongest performance, with RoBERTa reaching a macro-F1 of 74.5%, while a linear support vector machine remained competitive at a fraction of the computational cost when labeled data were scarce or compute was limited. Errors across all models concentrated on the neutral class, reflecting the inherent ambiguity of short informal text. The findings offer practical guidance for selecting sentiment classifiers under different resource constraints, including for the analysis of public comments on NEP-2020.