Transformer
DerivativeSlopeTransformer
Derivative slope transformer.
Transformer that computes the derivative of a time series, using numpy.gradient.
Mathematically, uses the central difference method in the interior and first differences at the boundaries, with respect to integer (iloc) index, that is:
\[\begin{align}\begin{aligned}f'(x) = (f(x+1) - f(x-1)) / 2, \mbox{ for } 1 \leq x \leq n-2\\f'(0) = f(1) - f(0)\\f'(n-1) = f(n-1) - f(n-2)\end{aligned}\end{align} \]
where n is the length of the time series, and indices range from 0 to n-1.
Schnellstart
python
from sktime.transformations.summarize import DerivativeSlopeTransformer
estimator = DerivativeSlopeTransformer