Enhanced Sentiment Analysis of Twitter(X) Data Using an Ensemble Stacking Model

M. Salomi, Govind Ashish Kalawate, Yash Talreja · 2025

Analysis of user sentiment and behavior on social media platforms, especially on Twitter (X), is becoming increasingly important now. This paper proposes a Stacking Classifier as an Ensemble Machine Learning Algorithm for improving the sentiment analysis on Twitter (X). Here, Logistic Regression (LR), Random Forest (RF), XGBoost, and SVM are taken as base classifiers and Logistic Regression (LR) is taken as a meta-learner for combining the outcome of all learners. The study uses the Tf-Idf approach in processing textual data to efficiently quantify and categorize text for sentiment analysis. text for sentiment analysis. Results from the proposed model are evaluated by employing ROC-AUC, F1-Score, Accuracy, Precision, and Recall metrics to guarantee performance efficacy. Nearly 89.70% accuracy was achieved by the layered classifier. We examined and performed comprehensive experiments with two important referenced works: the SVM, Random Forest (RF) and Decision Tree (DT) algorithm technique by Jyotsna Singh and Pradeep Tripathi [1] and the Ensemble Machine Learning technique by Pavlo Radiuk, Olga Pavlova, and Nadiia Hrypynska [2]. The model's ROC-AUC Score indicates its efficacy to distinguish between positive and negative data, and its continually strong performance demonstrates its dependability. The polarity score of 0.95 highlights the stark difference between the text's positive and negative emotions, indicating a very favorable mood. This research is noteworthy for its creation and implementation of a dependable approach for combining numerous classifiers using Meta-Learning. This method leads to higher accuracy and a more resilient sentiment analysis model. The results suggest that the Stacking Classifier is a useful technique for analyzing social network sentiment in more detail, which helps to understand the population's views and decisions

Read the paper · More papers on PaperTik