CutoffFhSplitter
Temporal train-test splitter, based on cutoff and forecasting horizon.
Train and test splits are determied as follows:
for each cutoff point k=cutoff[i], in split:
training fold is all loc indices up to and including
kif
fhis not passed, test fold is all loc indices strictly afterkif
fh is passed, test fold is all loc indices ink + fh, iffhis
- relative.
More precisely, fh.to_absolute_index(cutoff=k) If ``fh` is absolute, then the test window is
fhitself.
It should be noted that, unlike in CutoffSplitter, test folds are not determined by a window length, but by indices of the forecasting horizon fh, i.e., test folds can be non-contiguous, even if the data index is regular.
Schnellstart
from sktime.split.cutoff import CutoffFhSplitter
estimator = CutoffFhSplitter(cutoff, fh=None)Parameter(2)
- cutoffnp.array or pd.Index
Cutoff points, positive and integer- or datetime-index like. Type should match the type of
fhinput.- fhNone, ForecastingHorizon, int, timedelta, iterable of ints or timedeltas
Forecasting horizon, relative or absolute, to determine test folds. Type should match the type of
cutoffsinput. If not ForecastingHorizon, is coerced.