The Forecast node allows you to use time series data to attempt to predict the future values of a measure. The Forecast node requires a field containing a numeric measure. For best results, this field should also be sorted by date before it is used in training. The Forecast node will then ultimately output a data set containing projected values for a specific measure, for future time periods.
Forecast training
To perform Forecast training, you need a data set that contains a measure for which you would like to make predictions. For best results, this data set should also contain a Date or DateTime field.
Forecast example: Training
This example uses a sample from a sales data set. The object of training is to make a model for sales projections, based on historical sales amounts.
Field names: date
= Sales date and amt
= Sales amount
date |
amt |
---|---|
2016-04-02 |
14333.75 |
2016-06-18 |
16216.27 |
2016-02-19 |
18706.21 |
2016-03-12 |
15331.75 |
2016-07-16 |
13550.19 |
2016-02-05 |
24924.5 |
- Sort the incoming data.
The Forecast node expects the selected Input Field (the field that you want to base predictions on) to be a set of measures over time, therefore you need to sort this field before training. If the data set is not already sorted, select the Forecast node's Other tab, then select Sort. Select the Field that you want to sort by, and choose whether to sort in ascending or descending order by selecting or clearing the Ascending option. Sorted data:
date
amt
2016-02-05
24924.5
2016-02-19
18706.21
2016-03-12
15331.75
2016-04-02
14333.75
2016-06-18
16216.27
2016-07-16
13550.19
- Select the Forecast node's Model tab.
- Select
amt
in the Input Field property. - Select Train in the Operation property.
- Select an Analytic Model. Note that you can only select from Forecasting type analytic models.
- Select the Forecast node's Forecast tab.
- Enter the Number of Future Periods to Forecast, for example
5
. - Set the Auto Fit property to Yes.
- If you are familiar with forecasting and ARIMA models, you can use the remaining settings on the Forecast tab to make more granular modifications to your model.
- Run the analysis.
The Forecast node outputs a data set containing the original Input Field (amt
) and three new fields:
- TimePeriod - The Forecast node creates a time period for each record in the specified Input Field. It will also create an additional number of time periods equivalent to the value specified in the Number of Future Periods to Forecast property.
-
HistoricalValue - This field holds the actual value of the Input Field during the associated time period. In this example, note that
HistoricalValue
values match the values in theamt
field. Also note that forecast records do not have historical values. - IsForecast - True for records that represent forecasts. False for records that represent historical values.
The selected input field contains the values that the Forecasting model has assigned to your selected Input Field. In cases where IsForecast
is False
, the values represent a best fit of the HistoricalValue
at that time. In cases where IsForecast
is True
, the values are your projections:
TimePeriod |
HistoricalValue |
IsForecast |
amt |
---|---|---|---|
0 |
24924.5 |
False |
13705.16 |
1 |
18706.21 |
False |
13674.80 |
3 |
15331.75 |
False |
13924.12 |
4 |
14333.75 |
False |
14434.62 |
5 |
16216.27 |
False |
14572.03 |
6 |
13550.19 |
False |
13324.24 |
7 |
|
True |
14184.63 |
8 |
|
True |
14134.72 |
9 |
|
True |
14135.31 |
10 |
|
True |
14135.28 |
11 |
|
True |
14135.28 |
These fields can be output to a data store for use in other data stages.
Forecast evaluation and re-training
Once you have trained a Forecasting child model, you can decide if you want to score with the model or if you want to try to evaluate the model and create other models with different parameters. With the Forecast node, there is no explicit Evaluate operation, however you can use the output of training to compare historical values to forecast values in a new analysis or a dashboard.
You can then decide whether you want to try to create a different child model by making different specifications in the Forecast node's properties and training again.
Forecast scoring
Prerequisite: You have selected a child model within your analytic model to use for scoring, see Creating analytic models.
Once you have a child model to use for scoring, you can run the Forecast node with new data. To do so, simply create an Analysis that uses the Forecast node's Score operation.
The process of scoring is nearly identical to training:
- Use a Sort node to sort your data by date if it is not already sorted.
- Select the Forecast node and choose your Analytic Model. The specified scoring model will be used to make predictions.
- Select an Input Field on which to base the forecast. This should be the same type of field that was used during training.
- Specify the Number of Future Periods to Forecast. These will be your predictions.
- Run the analysis.
The Forecast node formats the output in the same way as it does for training, with TimePeriod
, HistoricalValue
, IsForecast
, and the specified Input Field. As with training, the values in the Input Field where IsForecast
is True
are your predictions.
Properties
Display Name
Specify a name for the node.
The default value is Forecast.
Model tab
Input Field
Select the input field on which you want to base the predictions.
Operation
Select an operation type. Choose from:
- Train
- Score
Analytic Model
Select an analytic model. You can only choose from Forecasting type models.
Forecast tab
Number of Future Periods to Forecast
Specify the number of future periods to forecast.
Autoregressive Order
If you are familiar with forecasting and ARIMA models, you can use this property to make more granular modifications to your Forecasting model.
Differencing Order
If you are familiar with forecasting and ARIMA models, you can use this property to make more granular modifications to your Forecasting model.
Moving Average Order
If you are familiar with forecasting and ARIMA models, you can use this property to make more granular modifications to your Forecasting model.
Include Intercept
If you are familiar with forecasting and ARIMA models, you can use this setting to make more granular modifications to your Forecasting model.
Objective Function and Optimization Method
If you are familiar with forecasting and ARIMA models, you can use this property to make more granular modifications to your Forecasting model.
Other tab
Sort
Select Sort if you want to sort the incoming data.
Field
Select the field that you want to sort by.
Ascending
Select to sort in ascending order. Clear to sort in descending order.