Time series transformations#
The sktime.transformations
module contains classes for data
transformations.
All (simple) transformers in sktime
can be listed using the sktime.registry.all_estimators
utility,
using estimator_types="transformer"
, optionally filtered by tags.
Valid tags can be listed using sktime.registry.all_tags
.
A full table with tag based search is also available on the Estimator Search Page (select “transformere” in the “Estimator type” dropdown).
For pairwise transformers (time series distances, kernels), instead see _transformations_pairwise_ref.
Transformations are categorized as follows:
Category |
Explanation |
Example |
---|---|---|
Composition |
Building blocks for pipelines, wrappers, adapters |
Transformer pipeline |
Series-to-features |
Transforms series to float/category vector |
Length and mean |
Series-to-series |
Transforms individual series to series |
Differencing, detrending |
Series-to-Panel |
transforms a series into a panel |
Bootstrap, sliding window |
Panel transform |
Transforms panel to panel, not by-series |
Padding to equal length |
Hierarchical |
uses hierarchy information non-trivially |
Reconciliation |
Composition#
Pipeline building - Structural#
|
Pipeline of transformers compositor. |
|
Concatenates results of multiple transformer objects. |
|
Column-wise application of transformers. |
|
Transformer wrapper to delay fit to the transform phase. |
|
Invert a series-to-series transformation. |
|
Create exogeneous features which are a copy of the endogenous data. |
|
Create features based on time index or hierarchy values. |
Pipeline building - Broadcasting and apply-map#
|
Apply a transformer columnwise to multivariate series. |
|
Transform by instance or panel. |
|
Constructs a transformer from an arbitrary callable. |
Pipeline building - AutoML, switches and multiplexing#
|
Facilitate an AutoML based selection of the best transformer. |
|
Wrap an existing transformer to tune whether to include it in a pipeline. |
|
Conditional execution of a transformer given a condition from a fittable object. |
|
Identity transformer, returns data unchanged in transform/inverse_transform. |
Pipeline building - Logging#
|
Logging transformer, writes data to logging, and otherwise leaves it unchanged. |
Sklearn and pandas adapters#
A transformer that turns time series/panel data into tabular data. |
|
|
Turns time series/panel data into tabular data based on intervals. |
|
Adapt scikit-learn transformation interface to time series setting. |
|
Adapt pandas transformations to sktime interface. |
Series-to-features transformers#
Series-to-features transformers transform individual time series to a collection of primitive features. Primitive features are usually a vector of floats, but can also be categorical.
When applied to panels or hierarchical data, the transformation result is a table with as many rows as time series in the collection.
Summarization#
These transformers extract simple summary features.
|
Calculate summary value of a time series. |
|
Transformer for extracting time series features. |
|
Create summary values of a time series' splits. |
Derivative slope transformer. |
|
|
Plateau finder transformer. |
Random interval feature extractor transform. |
|
|
Fitted parameter extractor. |
|
Transformer categorizing series into ADI-CV2 classes after Syntetos/Boylan. |
Shapelets, wavelets, and convolution#
|
Shapelet Transform. |
|
Random Shapelet Transform. |
|
Shapelet Transform, from |
|
RandOm Convolutional KErnel Transform (ROCKET). |
|
MINImally RandOm Convolutional KErnel Transform (MiniRocket). |
|
MINImally RandOm Convolutional KErnel Transform (MiniRocket) multivariate. |
MINIROCKET (Multivariate, unequal length). |
|
Discrete Wavelet Transform Transformer. |
Distance-based features#
|
Return the matrix profile and index profile for each time series of a dataset. |
Dictionary-based features#
|
Symbolic Fourier Approximation (SFA) Transformer. |
Auto-correlation-based features#
|
Transformer for calculating the Hurst exponent of a time series. |
Moment-based features#
|
Transformation class from the signature method. |
Feature collections#
These transformers extract larger collections of features.
Transformer for extracting time series features via |
|
|
Transformer for extracting time series features via |
|
Canonical Time-series Characteristics (Catch22). |
|
Canonical Time-series Characteristics (Catch22 and 24), using pycatch22 package. |
Series-to-series transformers#
Series-to-series transformers transform individual time series into another time series.
When applied to panels or hierarchical data, individual series are transformed.
Lagging#
|
Lagging transformer. |
|
Transformer for forecasting reduction. |
Element-wise transforms#
These transformations apply a function element-wise.
Depending on the transformer, the transformation parameters can be fitted.
|
Box-Cox power transform. |
|
Natural logarithm transformation. |
|
Scaled logit transform or Log transform. |
Cosine transformation. |
|
Apply element-wise exponentiation transformation to a time series. |
|
Apply elementwise square root transformation to a time series. |
|
Hyperbolic sine transformation and its inverse [Rf00c2e2051c3-1]. |
Detrending and Decomposition#
|
Remove a trend from a series. |
|
Remove seasonal components from a time series. |
|
Remove seasonal components from time series, conditional on seasonality test. |
|
Remove seasonal components from a time-series using STL. |
|
Season-Trend decomposition using LOESS for multiple seasonalities. |
|
Variational Mode Decomposition transformer. |
|
Clear sky transformer for solar data. |
Filtering and denoising#
|
Transformer that filters Series data. |
|
Filter a times series using the Baxter-King filter. |
|
Filter a times series using the Christiano Fitzgerald filter. |
|
Filter a times series using the Hodrick-Prescott filter. |
|
Kalman Filter, from pykalman (sktime native maintenance fork). |
|
Kalman Filter is used for denoising or inferring the hidden state of given data. |
|
Decompose the original data into two or more Theta-lines. |
|
Apply Bollinger bands to a time series. |
Differencing, slope, kinematics#
|
Apply iterative differences to a timeseries. |
|
Slope-by-segment transformation. |
|
Kinematic feature transformer - velocity, acceleration, curvature. |
Binning, sampling and segmentation#
|
Bins time series and aggregates by bin. |
|
Time series interpolator/re-sampler. |
|
Interval segmentation transformer. |
|
Random interval segmenter transformer. |
|
Dilation mapping transformer. |
|
Piecewise Aggregate Approximation Transformer (PAA). |
|
Symbolic Aggregate approXimation Transformer (SAX). |
Missing value treatment#
|
Missing value imputation. |
|
Drop missing values transformation. |
Seasonality and Date-Time Features#
|
DateTime feature extraction, e.g., for use as exogenous data in forecasting. |
|
Holiday features extraction. |
|
Country Holidays Transformer. |
|
Financial Holidays Transformer. |
|
Compute element-wise time elapsed between time index and a reference start time. |
|
Fourier Features for time series seasonality. |
Simple Fourier transform for time series. |
|
PeakTime feature extraction for use in e.g. tree based models. |
Auto-correlation series#
|
Auto-correlation transformer. |
|
Partial auto-correlation transformer. |
Window-based series transforms#
These transformers create a series based on a sequence of sliding windows.
|
Calculate the matrix profile of a time series. |
|
HOG1D transform. |
|
Extract contiguous subsequences of specified length based on rolling aggregates. |
Multivariate-to-univariate#
These transformers convert multivariate series to univariate.
Concatenate multivariate series to a long univariate series. |
Augmentation#
Augmenter inverting the time series by multiplying it by -1. |
|
|
Draw random samples from time series. |
Augmenter reversing the time series. |
|
|
Augmenter adding Gaussian (i.e. white) noise to the time series. |
FeatureSelection#
These transformers select features in X based on y.
|
Select exogenous features. |
|
Elbow Class Sum (ECS) transformer to select a subset of channels/variables. |
Elbow Class Pairwise (ECP) transformer to select a subset of channels. |
Subsetting time points and variables#
These transformers subset X by time points (pandas index or index level) or variables (pandas columns).
|
Column selection transformer. |
|
Index subsetting transformer. |
Adapters to other frameworks#
Generic framework adapters that expose other frameworks in the sktime
interface.
|
Applies a Temporian function to the input time series. |
Panel transformers#
Panel transformers transform a panel of time series into a panel of time series.
A panel transformer is fitted on an entire panel, and not per series.
Equal length transforms#
These transformations ensure all series in a panel have equal length
|
Padding panel of unequal length time series to equal, fixed length. |
|
Truncates unequal length panels between lower/upper length ranges. |
Dimension reduction#
|
Principal Components Analysis applied to panel of time series. |
Series-to-Panel transformers#
These transformers create a panel from a single series.
Bootstrap transformations#
|
Moving Block Bootstrapping method for synthetic time series generation. |
|
Splitter based Bootstrapping method for synthetic time series generation. |
|
Creates a population of similar time series. |
Panel-to-Series transformers#
These transformers create a single series from a panel.
|
Aggregates Panel data containing overlapping windows of one time series. |
Outlier detection, changepoint detection#
|
Use HampelFilter to detect outliers based on a sliding window. |
|
ClaSP (Classification Score Profile) Transformer. |
Hierarchical transformers#
These transformers are specifically for hierarchical data and panel data.
The transformation depends on the specified hierarchy in a non-trivial way.
|
Prepare hierarchical data, including aggregate levels, from bottom level. |
|
Hierarchical reconciliation transformer. |