ARIMA Filter
4 min
the arima filter forecasts the next value in a time series it fits an ensemble of arima (autoregressive integrated moving average) models to a rolling window of recent values and averages their forecasts into a single prediction use it when you want a short term forecast of a noisy or trending signal rather than a raw reading why use arima filter use this processor when a simple trend line isn't enough to model a noisy or seasonal signal, for example, forecasting the next reading from a sensor whose values trend and cycle at the same time how it works the processor keeps a rolling window of the most recent values and forecasts from it while the window fills, the processor passes the current value through as the prediction once the window is full, the processor fits several candidate arima (p, q) models and selects the best fit by minimizing the akaike information criterion (aic) the processor fits as many models as number of models specifies, then averages their forecasts averaging diverse models reduces the influence of any single poorly fit model the window updates only with messages where success is true , so failed reads do not distort the forecast differencing seasonality size controls how the processor differences the series before it fits a model 0 fits the series directly use this for a stationary series with no trend 1 applies a first difference to remove a linear trend 2 or more applies a seasonal difference at that lag for a repeating cycle output the processor adds a prediction field that holds the forecasted next value parameters note the processor produces predictions only after the window fills until then, it forwards the current value unchanged a larger window and a higher model count improve the forecast but increase the processing cost of each fit parameters details window size number of historical values used to fit the model default is 100 seasonality size differencing lag 0 is none, 1 is a first difference, and 2 or more is a seasonal difference default is 7 number of models number of diverse models to fit and average for the ensemble prediction default is 5 pass through value joins the input with the output of the processor