SplitterSummarizer
SplitterSummarizer
- class SplitterSummarizer(transformer, splitter=None, index='last', fit_on='transform_train', transform_on='transform_train')[source]
Create summary values of a time series’ splits.
A series-to-series transformer that applies the series-to-primitives transformer
transformerto each train split created using the splittersplitter.The i-th row of the resulting series is equivalent to
transformer.fit(X_fit).transform(X_trafo), whereX_fitandX_transformare obtained from thei-thsplit ofsplitter, as determined by thefit_onandtransform_onparameters.The output series aims to provide a summarization of the input series based on the given transformer and splitter.
- Parameters:
- transformer
sktimetransformer inheriting fromBaseTransformer series-to-primitives transformer used to convert series to primitives.
- splitter
sktimesplitter inheriting fromBaseSplitter, optional - (default=None)
splitter used to divide the series. If None, it takes
ExpandingWindowSplitterwithstart_with_window=Falseand otherwise default parameters.- indexstr, optional (default=”last”)
Determines the indexing approach for the resulting series. If “last”, the latest index of the split is used. If anything else, the row’s number becomes the index.
- fit_onstr, optional (default=”transform_train”)
What data to fit
transformeron, for thei-th row of the resulting series.“all_train” : transform the
i-th train split obtained fromsplitter.split_series, called on all data seen infitandupdatecalls, plus all data seen intransform.“all_test” : transform the
i-th test split obtained fromsplitter.split_series, called on all data seen infitandupdatecalls, plus all data seen intransform.“transform_train” : transform the
i-th train split obtained fromsplitter.split_series, called on the data seen intransform.“transform_test” : transform the
i-th test split obtained fromsplitter.split_series, called on the data seen intransform.
- transform_onstr, optional (default=”transform_train”)
What data to transform with
transformer, for thei-th row of the resulting series. Values and meaning same as forfit_on.
- transformer
- Attributes:
is_fittedWhether
fithas been called.
See also
SummaryTransformerCalculates summary value of a time series.
Examples
>>> from sktime.transformations.summarize import SplitterSummarizer >>> from sktime.transformations.summarize import SummaryTransformer >>> from sktime.split import ExpandingWindowSplitter >>> from sktime.datasets import load_airline >>> y = load_airline() >>> transformer = SplitterSummarizer( ... transformer=SummaryTransformer(), ... splitter=ExpandingWindowSplitter()) >>> y_splitsummarized = transformer.fit_transform(y)
Methods
transform(X)
(Transforms the series according to the specified) series-to-primitives transformer and splitter.

