Time series transformations#

The sktime.transformations module contains classes for data transformations.

Panel transformers#

Dictionary-based#

PAA([num_intervals])

(PAA) Piecewise Aggregate Approximation Transformer, as described in Eamonn Keogh, Kaushik Chakrabarti, Michael Pazzani, and Sharad Mehrotra.

SFA([word_length, alphabet_size, …])

Symbolic Fourier Approximation (SFA) Transformer.

SAX([word_length, alphabet_size, …])

SAX (Symbolic Aggregate approXimation) transformer.

Summarize#

DerivativeSlopeTransformer()

Derivative slope transformer.

PlateauFinder([value, min_length])

Plateau finder transformer.

RandomIntervalFeatureExtractor([…])

Random interval feature extractor transform.

FittedParamExtractor(forecaster, param_names)

Fitted parameter extractor.

tsfresh#

TSFreshRelevantFeatureExtractor([…])

Transformer for extracting and selecting features.

TSFreshFeatureExtractor([…])

Transformer for extracting time series features.

Catch22#

Catch22([outlier_norm, replace_nans, n_jobs])

Canonical Time-series Characteristics (catch22).

Compose#

ColumnTransformer(transformers[, remainder, …])

Column-wise application of transformers.

ColumnConcatenator()

Concatenate multivariate series to a long univariate series.

SeriesToSeriesRowTransformer(transformer[, …])

Series-to-series row transformer.

SeriesToPrimitivesRowTransformer(transformer)

Series-to-primitives row transformer.

make_row_transformer(transformer[, …])

Cate InstanceTransformer based on transform type, factory function.

Matrix profile#

MatrixProfile([m])

Return the matrix profile and index profile for each time series of a dataset.

PCA#

PCATransformer([n_components])

Principal Components Analysis applied to panel of time seires.

Reduce#

Tabularizer()

A transformer that turns time series/panel data into tabular data.

Rocket#

Rocket([num_kernels, normalise, n_jobs, …])

ROCKET.

MiniRocket([num_kernels, …])

MINIROCKET.

MiniRocketMultivariate([num_kernels, …])

MINIROCKET (Multivariate).

Segment#

IntervalSegmenter([intervals])

Interval segmentation transformer.

RandomIntervalSegmenter([n_intervals, …])

Random interval segmenter transformer.

Signature#

SignatureTransformer([augmentation_list, …])

Transformation class from the signature method.

Series transformers#

Detrend#

Detrender([forecaster])

Remove a trend from a series.

Deseasonalizer([sp, model])

Remove seasonal components from a time series.

ConditionalDeseasonalizer([…])

Remove seasonal components from time series, conditional on seasonality test.

STLTransformer([sp, seasonal, trend, …])

Remove seasonal components from a time-series using STL.

Adapt#

TabularToSeriesAdaptor(transformer[, …])

Adapt scikit-learn-like transformations to time series setting.

Box-Cox#

BoxCoxTransformer([bounds, method, sp])

Box-Cox power transform.

LogTransformer()

Natural logarithm transformation.

Scaled Logit#

ScaledLogitTransformer([lower_bound, …])

Scaled logit transform or Log transform.

ClaSP#

ClaSPTransformer([window_length, scoring_metric])

ClaSP (Classification Score Profile) Transformer.

Difference#

Differencer([lags, drop_na, na_handling])

Apply iterative differences to a timeseries.

Auto-correlation#

AutoCorrelationTransformer([adjusted, …])

Auto-correlation transformer.

PartialAutoCorrelationTransformer([n_lags, …])

Partial auto-correlation transformer.

Cosine#

CosineTransformer()

Cosine transformation.

Exponent#

ExponentTransformer([power, offset])

Apply element-wise exponentiation transformation to a time series.

SqrtTransformer([offset])

Apply element-sise square root transformation to a time series.

Matrix Profile#

MatrixProfileTransformer([window_length])

Calculate the matrix profile of a time series.

Missing value imputation#

Imputer([method, random_state, value, …])

Missing value imputation.

Datetime feature generation#

DateTimeFeatures([ts_freq, feature_scope, …])

DateTime Feature Extraction for use in e.g.

Lagged Window Summarizer#

WindowSummarizer([lag_config, lag_feature, …])

Transformer for extracting time series features.

Outlier detection#

HampelFilter([window_length, n_sigma, k, …])

Use HampelFilter to detect outliers based on a sliding window.

Composition#

TransformerPipeline(steps)

Pipeline of transformers compositor.

FeatureUnion(transformer_list[, n_jobs, …])

Concatenates results of multiple transformer objects.

FitInTransform(transformer[, …])

Transformer composition to always fit a given transformer on the transform data only.

OptionalPassthrough(transformer[, passthrough])

Wrap an existing transformer to tune whether to include it in a pipeline.

ColumnwiseTransformer(transformer[, columns])

Apply a transformer columnwise to multivariate series.

Theta#

ThetaLinesTransformer([theta])

Decompose the original data into two or more Theta-lines.

Augmenter#

InvertAugmenter()

Augmenter inverting the time series by multiplying it by -1.

RandomSamplesAugmenter([n, …])

Draw random samples from time series.

ReverseAugmenter()

Augmenter reversing the time series.

WhiteNoiseAugmenter([scale, random_state])

Augmenter adding Gaussian (i.e.

Summary#

SummaryTransformer([summary_function, quantiles])

Calculate summary value of a time series.

FeatureSelection#

FeatureSelection([method, n_columns, …])

Select exogenous features.

STLBootstrapTransformer#

STLBootstrapTransformer(n_series, sp, …)

Creates a population of similar time series.

MovingBlockBootstrapTransformer#

MovingBlockBootstrapTransformer(n_series, …)

Moving Block Bootstrapping method for synthetic time series generation.