Back to models
Splitter

SameLocSplitter

Splitter that replicates loc indices from another splitter.

Quickstart

python
from sktime.split.sameloc import SameLocSplitter

estimator = SameLocSplitter(cv, y_template=None)

Parameters(2)

cvBaseSplitter

splitter for which to replicate splits by loc index

y_templatetime series container of Series scitype, optional

template used in cv to determine loc indices if None, y_template=y will be used in methods

Examples

>>> from sktime.datasets import load_airline
>>> from sktime.split import (
... ExpandingWindowSplitter,
... SameLocSplitter,
... )
>>> y = load_airline ()
>>> y_template = y [: 60 ]
>>> cv_tpl = ExpandingWindowSplitter (fh = [2, 4 ], initial_window = 24, step_length = 12)
>>> splitter = SameLocSplitter (cv_tpl, y_template) these two are the same:
>>> list (cv_tpl. split (y_template))
>>> list (splitter. split (y))