Process modules are used to specify the latent-states (and their temporal dynamics) underlying your time-series(es):
LocalLevel
- a random-walk.
LocalTrend
- a random-walk with (optionally damped) velocity.
Season
- a process with seasonal structure, implementing the fourier-series based model from
De Livera, A.M., Hyndman, R.J., & Snyder, R. D. (2011).
LinearModel
- a linear-model allowing for external predictors.
A process which takes a model-matrix of predictors, and each state corresponds to the coefficient on each.
id – Unique identifier for the process
predictors – A sequence of strings with predictor-names.
measure – The name of the measure for this process.
fixed – By default, the regression-coefficients are assumed to be fixed: we are initially
uncertain about their value at the start of each series, but we gradually grow more confident. If
fixed=False
then we continue to inject uncertainty at each timestep so that uncertainty asymptotes
at some nonzero value. This amounts to dynamic-regression where the coefficients evolve over-time. Note only
KalmanFilter
(but not ExpSmoother
) supports this.
decay – By default, the coefficient-values will remain as the forecast horizon increases. An alternative is
to allow these to decay (i.e. pass True
). If you’d like more fine-grained control over this decay,
you can specify the min/max decay as a tuple (passing True
uses a default value of (.98, 1.0)
).
A process representing a random-walk.
id – A unique identifier for this process.
decay – If the process has decay, then the random walk will tend towards zero as we forecast out further (note that this means you should center your time-series, or you should include another process that does not have this decaying behavior). Decay can be between 0 and 1, but values < .50 (or even .90) can often be too rapid and you will run into trouble with vanishing gradients. When passing a pair of floats, the nn.Module will assign a parameter representing the decay as a learned parameter somewhere between these bounds.
A process representing an evolving trend.
id – A unique identifier for this process.
decay_velocity – If set, then the trend will decay to zero as we forecast out further. The default is to allow the trend to decay somewhere between .95 (moderate decay) and 1.00 (no decay), with the exact value being a learned parameter.
decay_position – See decay in LocalLevel
. Default is no decay.
velocity_multi – Default 0.1. A multiplier on the velocity, so that
next_position = position + velocity_multi * velocity
. A value of << 1.0 can be helpful since the
trend has such a large effect on the prediction, so that large values can lead to exploding predictions.
Method from De Livera, A.M., Hyndman, R.J., & Snyder, R. D. (2011), specifically the novel approach to modeling seasonality that they proposed.
id – Unique identifier for this process.
dt_unit – A numpy.timedelta64 (or string that will be converted to one) that indicates the time-units used in the kalman-filter – i.e., how far we advance with every timestep. Can be None if the data are in arbitrary (non-datetime) units.
period – The number of timesteps it takes to get through a full seasonal cycle. Does not have to be an
integer (e.g. 365.25 for yearly to account for leap-years). Can also be a numpy.timedelta64
(or string that
will be converted to one).
K – The number of the fourier components.
measure – The name of the measure for this process.
fixed – Whether the seasonal-structure is allowed to evolve over time, or is fixed (default:
fixed=False
). Setting this to True
can be helpful for limiting the uncertainty of long-range forecasts.
decay – By default, the seasonal structure will remain as the forecast horizon increases. An alternative is
to allow this structure to decay (i.e. pass True
). If you’d like more fine-grained control over this decay,
you can specify the min/max decay as a tuple (passing True
uses a default value of (.98, 1.0)
).