Zero Labs
Industry News / AI

Forecasting Demand for New Products

Source · Towards AI By Konstantin Burkin

From the publisher’s feed, collected in the ZeroLabs newsroom.

Source: Photo by Kathy Jones from PexelsSolving cold-start forecasting with classic ML: from baseline to transfer learning for gradient boostingTL;DRForecasting demand is a popular, but often challenging task in retail, e-commerce and logistics domains. The article describes undertaken approaches for forecasting new products: from baseline to a more complex modelling. The best accuracy was achieved using Transfer Learning: the model trained on regular products was further trained on new products. $WAPE was improved from 70% on baseline to 36%.While many articles, examples, and tutorials show how to forecast demand for regular products, few resources cover new products. This article documents a real-world case of forecasting approaches for new products.Forecasting demandForecasting demand is an important task for any business. An accurate forecast allows business to develop its financial plan, optimize logistics deliveries, and prepare marketing campaigns. It helps reduce operational costs and support product availability, which leads to customer retention and ultimately customer lifetime value (CLTV) growth.New or temporary products can increase additional sales, which contributes to a significant share of total revenue. Every successful launch requires assessing demand. Therefore, forecasting sales of new products is an important task for retail and logistics businesses.Characteristics of new productsThe main difference between new products and regular ones is that they do not have lag features such as `last_week_sales`. This feature is, firstly, a good forecast in itself (if the time series has weekly seasonality), and secondly, one of the most important features for any forecasting model. Without it, accuracy drops significantly.In this article, new products are products that have no sales history for creating lag features. These include products that 1) have never existed or been sold before and 2) seasonal products that stop selling after the season ends.New products can be 1) completely new or 2) similar to existing products that have just one new feature substituted or added (new syrup in coffee).Sales volume of new products 1) may be negligible or 2) may exceed the volume of regular products (Figure 1). New product launches are often paired with marketing promotions. These promotions push new product sales above those of regular products. However, sometimes new products are launched simply to expand the product range. Such products aren’t necessarily popular, and their sales are, conversely, lower than those of regular products.Figure 1. An example of a product launch that outsold its regular alternative.Therefore, forecasting new products in the same way as regular products is impossible and requires separate forecasting models. Without lag features, a model has no direct signal of how much a product is likely to sell. This gap must be filled by other means:Product similarity provides the most important information: a new product sharing key attributes with an established one is likely to exhibit a comparable sales pattern.Marketing features and popularity markers capture factors that drive demand independently of past sales.Together, these signals suggest that forecasting new products is best approached not through time-series extrapolation, but through comparison with structurally similar, already-observed products.Forecasting approachesThis section presents the approaches used to forecast new product demand. For each approach, approximate $WAPE scores are attached to evaluate influence on business. This metric weights each sample by its true cost, so expensive elements contribute more to the final score than cheap ones. That characteristic makes $WAPE better aligned with retail and e-commerce businesses’ unit economics.Figure 2. WAPE metric formulaBaselineThe initial approach is to assign a coefficient of popularity for each new product: how many “units per customer” (UPC) would be sold each day. UPC coefficient is fairly stable and can be estimated manually by calculating the UPC of similar products.Sales forecasts could be obtained by multiplying UPC by the “number of customers” (NOC): sales = NOC * UPC. NOC is usually a well-predicted value by standard autoregressive models, like SARIMA or Prophet. In this approach, UPC covers the magnitude of sales, while NOC covers intraweek seasonality.Result: The accuracy of the resulting forecast was quite poor ($WAPE > 70%).But this approach has several drawbacks:The UPC value can still vary slightly across time and region;There is no straightforward algorithm for calculating UPC for new products;The sales forecast is obtained by multiplying two forecast values, which increases the calculation error;In practice, the accuracy of the resulting forecast is poor.UPC calculation improvementWe can keep the same modelling approach, but improve UPC calculation. We want to predict UPC with ML. Moreover, since UPC changes over time, we want to predict it weekly.The data for both regular products and previously launched new products is used to easily calculate weekly UPC. Features are product categories and specifications, time-derived features, and a flag indicating whether the product is new or not.The evaluation is made by retraining the ML model before each product release and estimating forecasts for the first week after the launch. Here, a Gradient Boosting model can be used. For cases of many categorical values, CatBoost is recommended.Result: Final sales forecasts with predicted UPCs had $WAPE 45-55%. Training time and computing resources were low.This approach still has several drawbacks:Even during the first week, the sales can grow significantly day-to-day, and that is not represented by UPC.The sales forecast is still obtained by multiplying two predicted values, which increases the calculation error;The forecasting accuracy is still quite poor.What if we tried to predict the final sales figures with one model without intermediate values calculation (UPC)?One-model approachThe data of regular sales and the history of new product launches over the past year were used. Similar features describing product categories and specifications, time-derived features, and a “new product” flag were used. No lag features were calculated.Result: model showed similar metric as improved baseline approach ($WAPE 50%). The dataset size grew significantly, increasing training time and computing resources.The main drawback of this approach is class imbalance in the data. There are significantly more regular sales than new product launches (100:1). Two standard solutions (downsampling and upsampling) were tested.Result: Downsampling led to a decrease in model accuracy. Upsampling and combination of approaches also did not improve accuracy ($WAPE 50%). Upsampling required significantly more RAM.Synthetic data generation was not considered a reasonable approach here. However, the problem could be solved with knowledge transfer learning: training on the large dataset of regular products, and then fine-tuning on just new launches.Transfer learning approachThe Transfer Learning method for gradient boosting models is fairly simple to implement. The data was divided into two partitions (regular products and new products). The data features have to be identical for both parts.Thus, the first model (model) is trained on regular sales to account for seasonality, regional specificity, and the distribution of sales between product groups. The second model (fine_tuned_model) corrects the errors of the first model to forecast new products based on the changed sales distribution.The first model was trained on regular products with a high learning_rate of 0.025 and a small number of trees (n_estimators = 100). The second model was trained on new products with a low learning_rate of 0.01 and a large number of trees (n_estimators = 750).Result: Final sales forecasts with the model after first-step training: $WAPE 52%. After second-step training: $WAPE 36%. Training time and computing resources were comparable with the previous approaches.CatBoost with transfer learningHere is the implementation of the transfer learning approach for training CatBoost regression model:# 1st model: trained on regular productsmodel = cb.CatBoostRegressor(**params_1)model.fit( X_train_1, y_train_1, eval_set=(X_eval_1, y_eval_1), early_stopping_rounds=50,)# 2nd model: fine-tuned on new productsfine_tuned_model = cb.CatBoostRegressor(**params_2)fine_tuned_model.fit( X_train_2, y_train_2, eval_set=(X_eval_2, y_eval_2), early_stopping_rounds=50, init_model=model,)ConclusionsForecasting new products is a hard problem. Without a sales history, most standard time-series features — including lag features — are unavailable. There is no single best solution, but several approaches offer useful trade-offs. Here is a recap of the approaches that were tested:Baseline two-step modelling. We started with a simple baseline: sales = number of customers (NOC) × units per customer (UPC). NOC was predicted with a standard autoregressive model; UPC was estimated manually. This baseline produced forecasts quickly, but its accuracy was poor (WAPE above 70%). UPC estimation with ML model significantly improved the quality of predictions ($WAPE 45–55%).Basis single-step modelling. Two-step approaches, like the baseline, combine two separate forecasts into one. Each forecast carries its own error, and multiplying them together compounds these errors. Predicting sales directly, in a single step, avoids this problem. However, class imbalance limits the model’s ability to capture patterns associated with new products ($WAPE 50%).Single-step modelling: CatBoost with transfer learning. Transfer learning goes further: instead of predicting sales from scratch, it predicts the residual — the correction needed on top of an existing forecast. This preserves the accuracy of the base model while still adapting to new products. This approach improved $WAPE from 52% to 36% — the best result of all approaches tested, at no added computational cost.Forecasting Demand for New Products was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.