Splitter
CutoffSplitter
Cutoff window splitter.
Quickstart
python
from sktime.split.cutoff import CutoffSplitter
estimator = CutoffSplitter(cutoffs: list | ndarray | Index, fh=1, window_length: int | float | Timedelta | timedelta | timedelta64 | DateOffset=10)Parameters(3)
- cutoffslist or np.ndarray or pd.Index
Cutoff points, positive and integer- or datetime-index like. Type should match the type of
fhinput.- fhint, timedelta, list or np.ndarray of ints or timedeltas
Type should match the type of
cutoffsinput.- window_lengthint or timedelta or pd.DateOffset
Examples
>>> import numpy as np
>>> from sktime.split import CutoffSplitter
>>> ts = np. arange (10)
>>> splitter = CutoffSplitter (fh = [2, 4 ], cutoffs = np. array ([3, 5 ]), window_length = 3)
>>> list (splitter. split (ts)) [(array([1, 2, 3]), array([5, 7])), (array([3, 4, 5]), array([7, 9]))]