DEVELOPMENT OF A DATA PIPELINE INTEGRATED WITH DEMAND FORECASTING IN E-COMMERCE RETAIL
Abstract
This study develops a data pipeline integrated with demand forecasting in e-commerce retail and assesses whether machine learning models outperform a simple baseline. The Brazilian E-Commerce Public Dataset by Olist was organized into bronze, silver and gold layers in PostgreSQL, with demand defined as the number of items sold in delivered orders, by category and month. Linear Regression, Random Forest and Gradient Boosting were compared with a Naive baseline (previous month's demand) using MAE, RMSE and WAPE, under two scenarios: without and with Pareto grouping of categories. In the main test (June to August 2018), the Naive baseline had the lowest error, with WAPE of 16.11% without Pareto and 12.92% with Pareto, against 22.61% to 25.94% and 19.55% to 20.11% for the other models. Complementary analyses (sensitivity to the feature set, expanding-window walk-forward validation and modeling improvements) did not change this result: the Naive baseline had equal or lower WAPE in all scenarios and windows evaluated, with a practical tie in a single case. This behavior is consistent with a demand regime change, a short history and low predictability of monthly variation, hypotheses that were not formally tested. We conclude that, on this dataset, greater algorithmic complexity brought no gain in accuracy and that baselines should be a mandatory reference when selecting predictive models.
Author Biographies
Undergraduate student in Computer Engineering at the University of Araraquara (UNIARA), Araraquara, São Paulo, Brazil.
PhD and faculty member of the Engineering program at the University of Araraquara (UNIARA), Araraquara, São Paulo, Brazil.
PhD in Food and Nutrition, Master's degree in Regional Development and Environment, and Bachelor's degrees in Law and Economics.
References
BRANDÃO, Adriano Martins Pataro. Criação de dashboard analítico para dados de seguros de automóveis utilizando ETL e banco de dados. 2025. 101 f. Monografia (Graduação em Engenharia de Produção) – Escola de Minas, Universidade Federal de Ouro Preto, Ouro Preto, 2025.
CHOPRA, Sunil; MEINDL, Peter. Gestão da Cadeia de Suprimentos: Estratégia, Planejamento e Operação. 6. ed. São Paulo: Pearson, 2016.
DATABRICKS. Medallion Architecture. Databricks, 2023. Disponível em: https://www.databricks.com/glossary/medallion-architecture Acesso em: 10 abr. 2026.
GÉRON, Aurélien. Hands-On Machine Learning with Scikit-Learn, Keras and TensorFlow. 3. ed. Sebastopol: O’Reilly Media, 2022.
HYNDMAN, Rob J.; ATHANASOPOULOS, George. Forecasting: Principles and Practice. 3. ed. Melbourne: OTexts, 2021. Disponível em: https://otexts.com/fpp3/ Acesso em: 03 jun. 2026.
KLEPPMANN, Martin. Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable and Maintainable Systems. Sebastopol: O’Reilly Media, 2017.
KOLASSA, Stephan; SCHÜTZ, Wolfgang. Advantages of the MAD/Mean ratio over the MAPE. Foresight: The International Journal of Applied Forecasting, n. 6, p. 40-43, 2007.
MAKRIDAKIS, Spyros; SPILIOTIS, Evangelos; ASSIMAKOPOULOS, Vassilios. Statistical and Machine Learning forecasting methods: Concerns and ways forward. PLOS ONE, v. 13, n. 3, p. e0194889, 2018 DOI: https://doi.org/10.1371/journal.pone.0194889 DOI: https://doi.org/10.1371/journal.pone.0194889
MCKINNEY, Wes. Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython. 2. ed. Sebastopol: O’Reilly Media, 2018.
OLIST. Brazilian E-Commerce Public Dataset by Olist. Kaggle, 2018. Disponível em: https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce Acesso em: 27 jul. 2026.
PEDREGOSA, Fabian et al. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, v. 12, p. 2825-2830, 2011.
PROVOST, Foster; FAWCETT, Tom. Data science and its relationship to big data and data-driven decision making. Big Data, v. 1, n. 1, p. 51-59, 2013 DOI: https://doi.org/10.1089/big.2013.1508 DOI: https://doi.org/10.1089/big.2013.1508
REIS, Joe; HOUSLEY, Matt. Fundamentos de Engenharia de Dados: projete e construa sistemas de dados robustos. São Paulo: Novatec, 2023.
SILVA, Isadora S. da; CASSIANO, Mateus B. Big Data e Processamento de Dados: uma jornada para a descoberta de insights. Trabalho de Conclusão de Curso. Universidade Federal de Mato Grosso do Sul, Campo Grande, 2024.
SQLALCHEMY. SQLAlchemy Documentation. 2024. Disponível em: https://docs.sqlalchemy.org/ Acesso em: 15 abr. 2026.
