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.
SaturatedLinearModel - a linear model that allows for saturation effects (via EKF).
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.
Similar to LinearModel, except an additional ceiling state-element allows for saturating effects. That
is, if yhat = X @ state and in a normal linear model measured_mean = y_hat, the saturated linear model
still has measured_mean = y_hat when far from the ceiling, but has measured_mean = ceiling when close.
The measurement-function this process uses is:
measured_mean = yhat - (1. / s) * softplus(s * (yhat - ceiling))
With yhat defined above and s being a sharpness parameter which is scaled to the inverse of the ceiling height,
so that, as the ceiling lowers, sharpness increases. This allows the yhat -> measured_mean relationship to be
consistent when yhat is far from the ceiling (i.e., the ceiling won’t impact where yhat crosses the origin).
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. See LinearModel.
fix_ceiling – Like fixed, but for the ceiling state-element.
decay – See LinearModel
model_mat_kwarg_name – See LinearModel
ceiling_init_value – The initial value for the ceiling prior. Defaults to 1 +/- jitter. If your measure is very much not centered and/or scaled, optimization could be improved by putting an informative guess here.
anchor – If we start with yhat near the ceiling and reduce it, anchor is the yhat value at which yhat
converges to measured_mean. Typically, you want to leave this at zero, but that implicitly assumes your
predictors are centered.
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)).