The Impact of Ensemble Stacking with Machine Learning and Statistical Models on Improving Sales Forecasting Accuracy

Authors

  • Prima Yohana Bina Nusantara University
  • Alexander Agung Santoso Gunawan Bina Nusantara University
  • Heri Ngarianto Bina Nusantara University

DOI:

https://doi.org/10.21512/emacsjournal.v8i2.16162

Keywords:

Ensemble stacking, Sales forecasting, Machine learning, Statistical models, Random Forest, Extra Trees, XGBoost, Multiple Linear Regression, RidgeCV

Abstract

Sales forecasting in retail remains a challenge, as changing customer behavior and seasonal patterns undermine predictive accuracy. The Ensemble Stacking Framework for Machine Learning & Statistical Models is being suggested to improve forecasting of dynamic demands. For example, during promotional events, managers adjust their plans to account for changes in weather or unexpected changes in consumer preferences. They are unable to predict these changes. An Ensemble Stacking Framework was created using a Meta-Learner (RidgeCV) trained on historical retail sales data and several base learners (Random Forest, Extra Trees, XGBoost, and Multiple Linear Regression). Tree-Based Models help to create non-linear relationships, while Linear Regression helps us understand trend information. The Meta-Learner learns how to weigh each model based on the error each model makes over time. We assessed the quality of our model’s performance through RMSE and MAE. Special attention was given to assessing how well our models performed during periods of high volatility (i.e. holidays and post-promotional dips). Our model performed better than all other Base Models at all times. Also, stacked predictions showed less variation week-to-week and were able to return to normal quicker than other models after sudden shifts in demand. In practice, it allows for more confident safety-stock decisions and timely replenishment adjustments. Retailers can run a number of models in parallel and continuously rebalance them with new data as it comes in. Future work may include online updates of meta-learners and external covariates such as local events or competitor pricing.

Dimensions

Author Biographies

Prima Yohana, Bina Nusantara University

Computer Science Department, BINUS Graduate Program - Master of Computer Science

Alexander Agung Santoso Gunawan, Bina Nusantara University

Computer Science Department, School of Computer Science

Heri Ngarianto, Bina Nusantara University

Computer Science Department, School of Computer Science

References

Adewumi, I. O. (2026). Predictive Analytics for Sales Forecasting in Emerging Market Retail: An Ensemble Learning and Time-Series Approach for A&Z Supermarket. Community and Social Development Journal, 27(1), 95–114. https://doi.org/10.57260/csdj.2026.286583

Al-Bazi, A., H. Al-Salami, Q., Zulfikar, N., Jerjees, Z., & A. Ahmad, M. (2025). Advanced Performance Analysis in Sport Footwear Sales Prediction Using Machine Learning. The 5th International Scientific Conference on Administrative and Financial Sciences (CIC-ISCAFS’2025), 14–21. https://doi.org/10.24086/icafs2025/paper.1582

Attipoe, E. K., Yussiff, A. S., Asante-Mensah, M. G., Tetteh, E. D., & Turkson, R. E. (2025). An ensemble learning approach for diabetes prediction using the stacking method. Computer Science and Information Technologies, 6(2), 102–111. https://doi.org/10.11591/csit.v6i2.p102-111

Bihri, H., Charaf, L. A., Azzouzi, S., & Charaf, M. E. H. (2025). A Robust Stacking-Based Ensemble Model for Predicting Cardiovascular Diseases. AI, 6(7), 160. https://doi.org/10.3390/ai6070160

Daza, A., Sánchez, C. F. P., Apaza-Perez, G., Pinto, J., & Ramos, K. Z. (2024). Stacking ensemble approach to diagnosing the disease of diabetes. Informatics in Medicine Unlocked, 44, 101427. https://doi.org/10.1016/j.imu.2023.101427

El-Boghdady, A. M., Kishk, S., Ashour, M. M., & AbdElhalim, E. (2023). Machine-learning based stacked ensemble model for accurate multi classification of CBC Anemia. Mansoura Engineering Journal, 49(3), 4. https://doi.org/10.58491/2735-4202.3144

Googerdchi, K. F., & Jafari, S. M. (2025). Sales Forecasting in Retail Using Random Forest Regression: A Case Study on Walmart. 2025 4th International Conference on Computing and Information Technology (ICCIT), 592–597. https://doi.org/10.1109/ICCIT63348.2025.10989314

Hasan, M. D. R. (2024). Addressing seasonality and trend detection in predictive sales forecasting: A machine learning perspective. Journal of Business and Management Studies, 6(2), 100–109. https://doi.org/10.32996/jbms.2024.6.2.10

Jafar, R., Awad, A., Hatem, I., Jafar, K., Awad, E., & Shahrour, I. (2023). Multiple Linear Regression and Machine Learning for Predicting the Drinking Water Quality Index in Al-Seine Lake. Smart Cities, 6(5), 2807–2827. https://doi.org/10.3390/smartcities6050126

Jodar-Abellan, A., Van Oudenhove, M., De Vente, J., Boix-Fayos, C., & Eekhout, J. (2025). Predicting bankfull channel dimensions through Stepwise Multiple Linear Regression and Random Forest in intermittent Mediterranean streams.   In EGU General Assembly Conference Abstracts (pp. EGU25-11060). https://doi.org/10.5194/egusphere-egu25-11060

Karaoğlu, A., & Söyler, H. (2025). A New Approach for Improving Biodiesel Conversion Efficiency: A Stacking Ensemble Model Based on Linear Regression Approach with GAN-Enhanced. Arabian Journal for Science and Engineering, 50(23), 19421–19441. https://doi.org/10.1007/s13369-025-10227-5

Kumar, M., Singhal, S., Shekhar, S., Sharma, B., & Srivastava, G. (2022). Optimized Stacking Ensemble Learning Model for Breast Cancer Detection and Classification Using Machine Learning. Sustainability, 14(21), 13998. https://doi.org/10.3390/su142113998

Li, X. (2025). A study on monthly sales forecasting of new energy vehicles in urban areas using the WOA-BiGRU model. PloS One, 20(4), e0320962. https://doi.org/10.1371/journal.pone.0320962

Mame, M., Huang, S., Li, C., & Zhou, J. (2025). Application of Extra-Trees Regression and Tree-Structured Parzen Estimators Optimization Algorithm to Predict Blast-Induced Mean Fragmentation Size in Open-Pit Mines. Applied Sciences, 15(15), 8363. https://doi.org/10.3390/app15158363

Manzanas, R. (2020). Assessment of Model Drifts in Seasonal Forecasting: Sensitivity to Ensemble Size and Implications for Bias Correction. Journal of Advances in Modeling Earth Systems, 12(3), e2019MS001751. https://doi.org/10.1029/2019MS001751

N, P. H., P, K. D., M, S., & R, S. M. (2025). Sales Data Visualization and Future Predictions Using Power BI and Machine Learning. 2025 IEEE International Conference on Compute, Control, Network & Photonics (ICCCNP), 1–6. https://doi.org/10.1109/ICCCNP63914.2025.11233722

Shoko, C., Sigauke, C., & Makatjane, K. (2025). An Application of Ensemble Stacking in Machine Learning to Predict Short-term Electricity Demand in South Africa. Statistics, Optimization & Information Computing, 13(6), 2412–2433. https://doi.org/10.19139/soic-2310-5070-2170

Wang, M., Liu, Y., Li, G., Yue, Y., & Man, K. L. (2024). Unlocking Your Sales Insights: Advanced XGBoost Forecasting Models for Amazon Products. International Conference on Advanced Multimedia and Ubiquitous Engineering, 181–187. https://doi.org/10.1007/978-981-95-1565-3_23

Wang, N., & Li, Z. (2022). A stacking-based short-term wind power forecasting method by CBLSTM and ensemble learning. Journal of Renewable and Sustainable Energy, 14(4). https://doi.org/10.1063/5.0097757

Windrasari, S. N., Margono, H., & Putra, Y. A. N. S. (2025). Predictive Sales Analysis in Coffee Shops Using the Random Forest Algorithm. MALCOM: Indonesian Journal of Machine Learning and Computer Science, 5(3), 1000–1011. https://doi.org/10.57152/malcom.v5i3.2023

Yao, B. (2023). Walmart Sales Prediction Based on Decision Tree, Random Forest, and K Neighbors Regressor. Highlights in Business, Economics and Management, 5, 330–335. https://doi.org/10.54097/hbem.v5i.5100

Downloads

Published

2026-08-23

How to Cite

Yohana, P., Gunawan, A. A. S., & Ngarianto, H. (2026). The Impact of Ensemble Stacking with Machine Learning and Statistical Models on Improving Sales Forecasting Accuracy. Engineering, MAthematics and Computer Science Journal (EMACS), 8(2), 133–144. https://doi.org/10.21512/emacsjournal.v8i2.16162

Issue

Section

Articles
Abstract 171  .
PDF downloaded 5  .