Back to models
Splitter

SingleWindowSplitter

Single window splitter.

Quickstart

python
from sktime.split.singlewindow import SingleWindowSplitter

estimator = SingleWindowSplitter(fh, window_length=None)

Parameters(2)

fhint, list or np.array, optional (default=1)

Forecasting horizon, determines the test window. Should be relative. The test window is determined by applying the forecasting horizon fh to the end of the training window.

window_lengthint or timedelta or pd.DateOffset, optional (default=10)
Window length of the training window.

Examples

>>> import numpy as np
>>> from sktime.split import SingleWindowSplitter
>>> ts = np. arange (10)
>>> splitter = SingleWindowSplitter (fh = [2, 4 ], window_length = 3)
>>> list (splitter. split (ts)) [(array([3, 4, 5]), array([7, 9]))]