Zurück zu den Modellen
Splitter

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 k

  • if fh is not passed, test fold is all loc indices strictly after k

  • if fh is passed, test fold is all loc indices in k + fh, if fh is

relative.

More precisely, fh.to_absolute_index(cutoff=k) If ``fh` is absolute, then the test window is fh itself.

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

python
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 fh input.

fhNone, ForecastingHorizon, int, timedelta, iterable of ints or timedeltas

Forecasting horizon, relative or absolute, to determine test folds. Type should match the type of cutoffs input. If not ForecastingHorizon, is coerced.