APPLICATION OF MACHINE LEARNING ALGORITHMS FOR DAILY SALES FORECASTING IN A BRAZILIAN BREWING INDUSTRY
DOI:
https://doi.org/10.56238/arev8n2-064Keywords:
Demand Forecasting, Machine Learning, Time Series, Brewing IndustryAbstract
Sales forecasting is a strategic element for the brewing industry, a sector characterized by high seasonality and significant fluctuations associated with weekends, holidays, and festive events. Traditional statistical models, although widely applied, present limitations in capturing nonlinear relationships and complex patterns inherent to demand time series. In this context, this study aims to evaluate the application of machine learning algorithms for daily sales forecasting in a Brazilian brewing industry. To this end, a historical dataset of daily sales covering the period from May 2024 to May 2025 was used, adopting a temporal split in which data from 2024 were employed for model training and data from 2025 were reserved for testing. Temporal feature engineering was performed, including calendar variables, holiday indicators, lagged variables, and moving statistics. Four tree-based algorithms were evaluated: Decision Tree, Random Forest, XGBoost, and LightGBM, using the coefficient of determination (R²), mean absolute error (MAE), and root mean squared error (RMSE) as performance metrics. The results indicate that ensemble models significantly outperform the single decision tree, with XGBoost achieving the best predictive performance, explaining approximately 89.9% of the variance in daily sales. It is concluded that the application of machine learning algorithms combined with temporal feature engineering constitutes an effective approach for demand forecasting in the brewing sector, providing relevant support for production, inventory, and logistics planning.
Downloads
References
ALVES, Ricardo Marques; SILVA, Luiz Fernando. Padrões temporais no consumo de bebidas alcoólicas no Brasil. Revista de Saúde Pública, São Paulo, v. 57, p. 17, 2023. Disponível em: https://www.scielosp.org/article/rsp/2023.v57/17/pt/. Acesso em: [26/01/2026].
BANDARA, Kasun; BERGMEIR, Christoph; SMITH, Rob J. Forecasting across time series databases using recurrent neural networks on groups of similar series: A clustering approach. Expert Systems with Applications, v. 140, 112896, 2020.Disponível em: https://www.sciencedirect.com/science/article/abs/pii/S0957417419306128. Acesso em: [26/01/2026].
BERGMEIR, Christoph; BENÍTEZ, José Manuel. On the use of cross-validation for time series predictor evaluation. Information Sciences, v. 191, p. 192–213, 2012.
BOX, George E. P.; JENKINS, Gwilym M.; REINSEL, Gregory C. Time series analysis: forecasting and control. 5. ed. Hoboken: Wiley, 2015.
BREIMAN, Leo. Random forests. Machine Learning, v. 45, n. 1, p. 5–32, 2001. Disponível em: https://link.springer.com/article/10.1023/A:1010933404324. Acesso em: 26 jan. 2026.
CHEN, Tianqi; GUESTRIN, Carlos. XGBoost: A scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York: ACM, 2016. p. 785–794.
DE OLIVEIRA DIAS, Murillo; FALCONI, Davi. The evolution of craft beer industry in Brazil. Journal of Economics and Business, v. 1, n. 4, p. 618-626, 2018.
MAKRIDAKIS, Spyros; BAKAS, Nikolas. Forecasting and uncertainty: A survey. Risk and Decision Analysis, v. 6, n. 1, p. 37–64, 2016.
HASTIE, Trevor; TIBSHIRANI, Robert; FRIEDMAN, Jerome. The elements of statistical learning: data mining, inference, and prediction. 2. ed. New York: Springer, 2009.
HYNDMAN, Rob J.; ATHANASOPOULOS, George. Forecasting: principles and practice. 2. ed. Melbourne: OTexts, 2018.
KE, Guolin; MENG, Qi; FINLEY, Thomas; WANG, Taifeng; CHEN, Wei; MA, Weidong; YE, Qiwei; LIU, Tie-Yan. LightGBM: A highly efficient gradient boosting decision tree. In: Advances in Neural Information Processing Systems. Red Hook: Curran Associates, 2017. p. 3146–3154.
LIU, Yanli; WANG, Yourong; ZHANG, Jian. New machine learning algorithm: Random Forest. In: LIU, Bing; MA, Min; CHANG, Jie (eds.). Information Computing and Applications. Lecture Notes in Computer Science, v. 7473. Berlin, Heidelberg: Springer, 2012. p. 246–252. Disponível em: https://doi.org/10.1007/978-3-642-34062-8_32. Acesso em: [26/01/2026].