Demand Prediction
Demand prediction is the process of forecasting the future demand for your catalogue items. It is based on historical data for sales orders, and uses machine learning algorithms to provide you with accurate predictions.
Requesting a Demand Prediction
To request a demand prediction, you need to have a collection with historical data for sales orders on Mantissa. You can create a collection and upload your data following instructions in the Collection section.
Once you have uploaded your sales orders data, you can request a demand prediction by sending a POST request to the invocation endpoint, with demand-prediction as invocationType.
See more at Invoke Mantissa.
You can customize your demand prediction by specifying the following parameters in the request body:
horizon: the number of periods for which you want to predict the demand;start_date: the first date for which you want to generate forecasts;granularity: the reference period for which the forecasts are to be calculated;aggregation: the taxonomy level for which to receive forecasts.
For details on the parameters, look at the Customizing Invocations section.
Interpreting the Demand Prediction Results
The results of a demand prediction request will provide you with the estimated demand for each item in your inventory. The demand is forecasted for the granularity and aggregation level you selected, starting from the starting date you specified, for the number of periods you requested.
Here is provided an example for a Demand Prediction.
Suppose you have three items in your inventory: item1, item2, and item3. Their taxonomy is as follows:
item1:classification1,family1;item2:classification1,family1;item3:classification2,family2.
Example 1
You request a demand prediction with parameters:
horizon: 3;start_date: 2022-01-31;granularity: M;aggregation: item.
The output, in json format, will be:
[
{
"ItemCode": "item1",
"OrderDate": "2022-01-31",
"Quantity": 100
},
{
"ItemCode": "item1",
"OrderDate": "2022-02-28",
"Quantity": 120
},
{
"ItemCode": "item1",
"OrderDate": "2022-03-31",
"Quantity": 110
},
{
"ItemCode": "item2",
"OrderDate": "2022-01-31",
"Quantity": 80
},
{
"ItemCode": "item2",
"OrderDate": "2022-02-28",
"Quantity": 90
},
{
"ItemCode": "item2",
"OrderDate": "2022-03-31",
"Quantity": 100
},
{
"ItemCode": "item3",
"OrderDate": "2022-01-31",
"Quantity": 50
},
{
"ItemCode": "item3",
"OrderDate": "2022-02-28",
"Quantity": 60
},
{
"ItemCode": "item3",
"OrderDate": "2022-03-31",
"Quantity": 70
}
]
The numbers associated to each date represent the predicted quantity of the item that will be requested by your customers on that month.
Example 2
You request a demand prediction with parameters:
horizon: 2;start_date: 2022-01-30;granularity: W;aggregation: family.
The output, in json format, will be:
[
{
"ItemFamily": "family1",
"OrderDate": "2022-01-30",
"Quantity": 180
},
{
"ItemFamily": "family1",
"OrderDate": "2022-02-28",
"Quantity": 210
},
{
"ItemFamily": "family2",
"OrderDate": "2022-01-30",
"Quantity": 50
},
{
"ItemFamily": "family2",
"OrderDate": "2022-02-28",
"Quantity": 60
}
]