Predicting Social Media Virality Using Stacking Ensemble with Random Forest, XGBoost and Logistic Regression
Upasana Adhikari, Subir Gupta, Joyjit Patra · 2025
The research investigates predicting the virality of content on social media platforms using a stacking ensemble model with Random Forest, XGBoost, and Logistic Regression. Social media trends and user interactions remain largely uncontrollable, but this approach seeks to address those issues using sophisticated machine learning methods. Parlor models in itchnology tend to ignore the persistent inconsistencies associated with worldwide phenomena of viral content or fail to generalize adequately. The study model addresses these shortcomings with a balanced dataset and attention to feature importance calculated with user engagement defined as shares, likes, and comments. Incorporating Random Forest and XGBoost improves model robustness when faced with complicated cases while increasing overall accuracy. At the same time, “meta-classifier” Logistic Regression further improves results by integrating diverse base model predictions. This research is unique in employing an optimized stacking ensemble model to significantly enhance predictions of social media virality. This model extends academic frontiers and provides actionable knowledge to firms and content developers who wish to improve their engagement through targeted marketing in the ever-evolving digital ecosystem.