sktime.transformations.panel.matrix_profile

class sktime.transformations.panel.matrix_profile.MatrixProfile(m=10)[source]

Bases: sktime.transformations.base._PanelToTabularTransformer

Takes as input a time series dataset and returns the matrix profile and index profile for each time series of the dataset.

Example of use: # Xt = MatrixProfile(m).transform(X) X, a pandas DataFrame, is the the dataset. m, an integer, is the desired subsequence length to be used. Xt is the transformed X, i.e., a pandas DataFrame with the same number of rows as X, but each row has the matrix profile for the corresponding time series.

transform(X, y=None)[source]

Takes as input a time series dataset and returns the matrix profile for each single time series of the dataset.

Parameters

X (pandas.DataFrame) – Time series dataset.

Returns

Xt – Dataframe with the same number of rows as the input. The number of columns equals the number of subsequences of the desired length in each time series.

Return type

pandas.DataFrame