Enhancing Retail Demand Forecasting Accuracy through Feature Engineering and Stacked Tree-Based Ensembles: A Comparative Study with Deep Learning Model
Abstract:Retail demand forecasting is the foundation of supply chain management, allowing businesses to estimate future sales, optimize inventory levels, and improve production planning. Traditional forecasting systems have developed because of advances in machine learning, notably tree-based ensemble models and deep learning methodologies, which can capture complicated and non-linear trends in retail data. This study compares the performance of a stacked ensemble of tree-based models- Random Forest, XGBoost, LightGBM, and CatBoost (with Gradient Boost as the meta-learner)- against a deep learning artificial neural network (ANN) for retail demand forecasting. The research uses a five-year, multi-store, multi-item sales dataset and employs robust feature engineering techniques, including lag features, rolling windows, month-over-month sales growth, and interaction terms, to extract meaningful temporal and cross-sectional patterns from the data. The forecasting is performed for the course of 3 months for proper inventory management and to help the manufacturer plan their production. An ANOVA test showed that about 71% of the variation in sales could be explained by the selected features, supporting the use of feature engineering. The stacking of the model is compared with ANN, which is a popular deep learning model for forecasting. The stacking model showed the highest performance with a maximum R2 value of 0.994 and only maximum of 0.924 was obtained with ANN. The results also demonstrated that the ensemble of tree-based models outperformed individual models in key metrics, with the top-performing model from the tree-based group being used in the stacking process. This research demonstrates that tree-based stacking models can perform better to capture non-linear relationships by improving forecast accuracy when applied proper feature engineering.
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-06-30
- DOI
- https://doi.org/10.5281/zenodo.15774183
- Primary Topic
- Forecasting Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00