Transformer
TSBootstrapAdapter
Adapter for TSBootstrap.
The bootstrap samples will be returned as a Panel with the first level being integer index of the synthetic sample.
For hierarchical data, the bootstrap index will be added as the index at integer position -2.
Quickstart
python
from sktime.transformations.bootstrap import TSBootstrapAdapter
estimator = TSBootstrapAdapter(bootstrap, include_actual=False, return_indices=False)Tags
Capabilities
- Multivariate
- Missing values
- Unequal-length series
- Inverse transform: Not supported
- Removes missing values: Not supported
- Equalizes series length: Not supported
Properties
- Input typescitype:transform-input
- Series
- Output typescitype:transform-output
- Panel
- Label typescitype:transform-labels
- None
- Fit is emptyfit_is_empty
- Yes
- Keeps the time indextransform-returns-same-time-index
- Yes
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(3)
- bootstrapbootstrap from tsbootstrap
- The splitter used for the bootstrap splitting.
- include_actualbool, default=False
- Whether to include the actual data in the output.
- return_indicesbool, optional
- If True, the output will contain the resampled indices as extra column, by default False.
Examples
>>> from sktime.datasets import load_airline
>>> from sktime.transformations.bootstrap import TSBootstrapAdapter
>>> from tsbootstrap import MovingBlockBootstrap,
>>> y = load_airline ()
>>> bootstrap = TSBootstrapAdapter (
... MovingBlockBootstrap (n_bootstrap = 10, block_length = 10)
... )
>>> result = bootstrap. fit_transform (y)