sktime.transformations.panel.slope

class sktime.transformations.panel.slope.SlopeTransformer(num_intervals=8)[source]

Bases: sktime.transformations.base._PanelToPanelTransformer

Class to perform the Slope transformation on a time series dataframe. It splits a time series into num_intervals segments. Then within each segment, it performs a total least squares regression to extract the gradient of the segment.

Parameters

num_intervals (int, number of approx equal segments) – to split the time series into.

transform(X, y=None)[source]
Parameters

X (a pandas dataframe of shape = [n_samples, num_dims]) – The training input samples.

Returns

df

Return type

a pandas data frame of shape = [num_intervals, num_dims]