forecast

Predicts data for given time series data.

Syntax

forecast [OPTIONS] TIME_SERIES_FIELD [by GRP_FIELD, ...]
Required Parameters
TIME_SERIES_FIELD
Field that contains time-series data.
Optional Parameters
count=INT
Number of rows of data to be predicted(default: 5)
period=INT
Time series cycle. It is automatically calculated using a Fast Fourier Transform (FFT) if not specified.
seed=INT
Fixed seed value. Specify this option when you want to keep the same result for the same input.
time=FIELD
Field to be used as the time record (default: _time field)
[by GRP_FIELD, ...]
Grouping fields in the aggregation with by directive, separated by a comma (,). This option MUST follow after the TIME_SERIES_FIELD option.

Description

It is recommended that you set a constant interval between the data in the time field by using the timechart command, and then use the forecast command. There must be at least 4 data points for each grouping field, and the value of the period must be less than one-half of the number of data points.

Usage

  1. Predict values of the count field.

    forecast count
    
  2. Set the time series cycle of the traffic field to 5, and assign the time series prediction data according to the time written in the set_time field. Assign 1234 as a fixed seed value to maintain the same result.

    forecast period=5 time=set_time seed=1234 traffic
    
  3. Predict 10 data points of the series from the sent_bytes field aggregated by the region group.

    forecast count=10 sent_bytes by region