RecursiveReductionForecaster
Recursive reduction forecaster, incl exogenous Rec.
Implements recursive reduction, of forecasting to tabular regression.
Algorithm details:
- In
fit, given endogeneous time seriesyand possibly exogenousX: fits
estimatorto feature-label pairs as defined as follows.features =
y(t),y(t-1), …,y(t-window_size), if provided:X(t+1)labels =y(t+1)ranging over alltwhere the above have been observed (are in the index)- In
predict, given possibly exogenousX, at cutoff timec, applies fitted estimators’ predict to feature =
y(c),y(c-1), …,y(c-window_size), if provided:X(c+1)to obtain a prediction fory(c+1). If a giveny(t)has not been observed, it is replaced by a prediction obtained in the same way - done repeatedly until all predictions are obtained. Out-of-sample, this results in the “recursive” behaviour, where predictions at time points c+1, c+2, etc, are obtained iteratively. In-sample, predictions are obtained in a single step, with potential missing values obtained via theimputestrategy chosen.
Quickstart
from sktime.forecasting.compose import RecursiveReductionForecaster
estimator = RecursiveReductionForecaster(estimator, window_length=10, impute_method='bfill', pooling='local')Parameters(4)
- estimatorsklearn regressor, must be compatible with sklearn interface
- tabular regression algorithm used in reduction algorithm
- window_lengthint, optional, default=10
- window length used in the reduction algorithm
- impute_methodstr, None, or sktime transformation, optional
Imputation method to use for missing values in the lagged data
default=”bfill”
if str, admissible strings are of
Imputer.methodparameter, see there. To pass further parameters, pass theImputertransformer directly, as described below.if sktime transformer, this transformer is applied to the lagged data. This needs to be a transformer that removes missing data, and can be an
Imputer.if None, no imputation is done when applying
Lagtransformer
- poolingstr, one of [“local”, “global”, “panel”], optional, default=”local”
- level on which data are pooled to fit the supervised regression model “local” = unit/instance level, one reduced model per lowest hierarchy level “global” = top level, one reduced model overall, on pooled data ignoring levels “panel” = second lowest level, one reduced model per panel level (-2) if there are 2 or less levels, “global” and “panel” result in the same if there is only 1 level (single time series), all three settings agree