SplitterBootstrapTransformer
Splitter based Bootstrapping method for synthetic time series generation.
Quickstart
from sktime.transformations.bootstrap import SplitterBootstrapTransformer
estimator = SplitterBootstrapTransformer(splitter=None, fold='train', shuffle=False, subsample=None, replace=True, random_state=None)Parameters(6)
- splitteroptional, sktime splitter, BaseSplitter descendant
- default = SlidingWindowSplitter(window_length=3, step_length=1) The splitter used for the bootstrap splitting.
- foldstr, one of “train” (default), “test”, and “both”
Determines which fold is returned as new instances in the panel. “train” - the training folds; “test” - the test folds; “both” - both training and test folds, and an additional string level with possible values
"train"and"test"is present- shufflebool, default=False
- whether to shuffle the order of folds uniformly at random before returning if not, folds will be returned in the ordering defined by the splitter
- subsampleoptional, int or float, default = None
if provided, subsamples the folds returned uniformly at random
int= subsample of that size will be returned (or full sample if smaller)float, must be between 0 and 1 = subsample of that fraction is returned Note: integer 1 selects one series; float 1 selects number insplittermany- replacebool, default=True; only used if subsample=True
whether sampling, if
subsampleis provided is with or without replacementTrue= with replacement,False= without replacement- random_stateint, np.random.RandomState or None (default)
Random seed for the estimator if
None,numpyenvironment random seed is used ifint, passed tonumpyRandomStateas seed ifRandomState, will be used as random generator
Examples
>>> from sktime.transformations.bootstrap import SplitterBootstrapTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = SplitterBootstrapTransformer (fold = "both")
>>> y_hat = transformer. fit_transform (y)