io.warp10:warp10-ext-forecasting

Installation

$ wf g -w /path/to/warp10 io.warp10 warp10-ext-forecasting

/path/to/warp10/ is where Warp 10 is physically located.

Readme

Notice

This repository only contains the documentation of warp10-ext-forecasting.

The documentation is located under src/main/warpscript/io.warp10/warp10-ext-forecasting/.

These functions are available on the Warp 10 instance of the sandbox.

To install this extension on-premise or to make it available on your saas plan, please contact us.

Forecast extension for the WarpScript language

Functions that build GTS forecast models:

RANDOMWALK           // build a random walk model
SRANDOMWALK          // build a random walk model that is seeded with PRNG function
LSTM                 // build an LSTM neural network model
NNETAR               // build a neural network auto-regressive model
SES                  // build a simple exponential smoothing model
HOLT                 // build a Holt's linear model (SES + trend)
HOLTWINTERS          // build a Holt-Winters' model (SES + trend + seasonal)
ARMA                 // build an auto-regressive moving average model
ARIMA                // build an auto-regressive integrated moving average model
SARMA                // build a seasonal auto-regressive moving average model
SARIMA               // build a seasonal auto-regressive integrated moving average model
SEARCH.ETS           // search for a suitable exponential trend-seasonal model (include SES, HOLT and HOLTWINTERS)
SEARCH.ARIMA         // search for a suitable Arima model (include ARMA and ARIMA)
SEARCH.SARIMA        // search for a suitable Sarima model (include SARMA and SARIMA)
SEARCH.NNET          // search for a suitable neural network model (include LSTM and NNETAR)
AUTO                 // automatically choose a forecast model (non-seasonal)
SAUTO                // automatically choose a seasonal forecast model

Functions that take a GTS forecast model as argument:

FORECAST                 // forecast values in the future
FORECAST.ADDVALUES       // forecast values in the future and append them to observation GTS
INFORECAST               // produce in-sample one-step ahead forecasts
CROSSFORECAST            // forecast values given a model fitted with another GTS
CROSSFORECAST.ADDVALUES  // forecast values given a model fitted with another GTS and append them to input GTS
FORECAST.ANOMALIES       // detect anomalies in in-sample forecast
FORECAST.ANOMALIES.DROP  // detect anomalies in in-sample forecast and drop them from input GTS
MODELINFO // return map of information about the model AIC // compute Akaike information criterion

Functions related to stationarity and differencing:

STATIONARY     // test whether input GTS is stationary
DIFF           // apply time differencing with one or more seasonalities
INVERTDIFF     // integrate with one or more seasonalities

Fit / Transform / Inverse-Transform programming pattern (similar to sklearn)

FIT               // fit a GTS transformer
TRANSFORM         // transform a GTS using a GTS transformer
INVERSETRANSFORM  // inverse-transform a GTS using a GTS transformer
GTSTRANSFORMER    // build a GTS transformer from a set of macros
DIFFERENCER       // build a GTS transformer for time differencing

Examples

<GTS> AUTO 5 FORECAST creates a GTS containing the 5 forecast ticks using an automatically selected model.

<GTS> AUTO 5 FORECAST.ADDVALUES merges a GTS with its forecast.

<GTS> 24 SAUTO 48 FORECAST creates a GTS containing the 48 forecast ticks using a model considering that there is a 24-tick seasonal cycle.

Recommendations and troubleshooting

The input GTS needs not be bucketized and filled, but it will work better if it is the case.

Each next forecast will be on tick = last_tick + (last_tick - penultimate_tick).

Use UNBUCKETIZE first if the last bucket does not match the tick of the last non-null value, or else there will be a gap between the last non-null value and the first forecast value.

The forecast functions have an optional argument that defines the maximum number of past ticks they use to build their model (max input size). The default value is dependent on the model so that their default time to execute is roughly equivalent.

Author
Avatar

Jean-Charles Vialatte

jean-charles.vialatte@senx.io

Version

1.0.5

Type

Extension

Last published

2020-02-07

License

SenX private

Downloads
Repository

Github

Tags
forecast
Path Size Creation time
  AIC 900 bytes 2020-02-07
  ARIMA 1560 bytes 2020-02-07
  ARMA 1489 bytes 2020-02-07
  AUTO 892 bytes 2020-02-07
  CROSSFORECAST 1391 bytes 2020-02-07
  CROSSFORECAST.ADDVALUES 1166 bytes 2020-02-07
  DIFF 708 bytes 2020-02-07
  DIFFERENCER 1163 bytes 2020-02-07
  FIT 759 bytes 2020-02-07
  FORECAST 1283 bytes 2020-02-07
  FORECAST.ADDVALUES 1069 bytes 2020-02-07
  FORECAST.ANOMALIES 1147 bytes 2020-02-07
  FORECAST.ANOMALIES.DROP 1152 bytes 2020-02-07
  GTSTRANSFORMER 1093 bytes 2020-02-07
  HOLT 1808 bytes 2020-02-07
  HOLTWINTERS 2147 bytes 2020-02-07
  INFORECAST 955 bytes 2020-02-07
  INVERSETRANSFORM 724 bytes 2020-02-07
  INVERTDIFF 960 bytes 2020-02-07
  LSTM 1646 bytes 2020-02-07
  MODELINFO 919 bytes 2020-02-07
  NNETAR 2080 bytes 2020-02-07
  RANDOMWALK 1088 bytes 2020-02-07
  SARIMA 1910 bytes 2020-02-07
  SARMA 1761 bytes 2020-02-07
  SAUTO 990 bytes 2020-02-07
  SEARCH.ARIMA 1375 bytes 2020-02-07
  SEARCH.ETS 1204 bytes 2020-02-07
  SEARCH.NNET 1427 bytes 2020-02-07
  SEARCH.SARIMA 1629 bytes 2020-02-07
  SES 1474 bytes 2020-02-07
  SRANDOMWALK 1267 bytes 2020-02-07
  STATIONARY 934 bytes 2020-02-07
  TRANSFORM 711 bytes 2020-02-07
Versions Published
1.0.5 2020-02-07
1.0.3 2020-01-16
1.0.2-uberjar 2019-11-14
1.0.1-uberjar 2019-11-13
1.0.0-uberjar 2019-11-13