Skip to content

Modeling consumer demand in retail using machine learning

2026 · SOFT MEASUREMENTS AND COMPUTING · 0 citations

Abstract

The retail market is characterised by high volatility, which creates a serious obstacle to accurate demand forecasting. Under such conditions, traditional econometric tools cease to cope, leaving operational planning tasks without a quality solution. The article aims to develop an instrumental approach capable of taking into account the nonlinear nature of demand and the combination of external and internal factors influencing it. The study builds on XGBoost, an ensemble gradient boosting algorithm that operates over decision trees and makes it possible to merge quantitative metrics (past sales, inflation, price elasticity) within a single computational framework. and qualitative predictors (day of the week, marketing campaigns, weather, seasonality) within a single computational framework. To combat overfitting, a five-block stratified cross-validation was applied, which preserved the seasonal structure of the data and ensured the model's robustness to abnormal market fluctuations. Experimental verification of the approach was performed on depersonalised transactional data from the retail sector (over 150 thousand records for 2024–2026). Comparison with the benchmark ARIMA model showed that XGBoost nearly halves the mean absolute percentage error (MAPE), bringing it down from 16.8 % to 8.4 %. Analysis of predictor importance revealed that the greatest contribution to forecast accuracy is made by the previous week's sales volume and marketing campaigns. The theoretical significance of the work lies in substantiating a methodology for integrating qualitative predictors into an ensemble model for forecasting non-stationary time series. The practical value consists in the applicability of the developed model for inventory planning and optimisation of logistics costs at retail enterprises. Further development of the approach involves the use of real-time consumer behaviour data to reduce the time gap between demand changes and the logistics system's response.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.