discrete_derivative
DiscreteDerivative(features, *, method='central', derivative_suffix='_derivative')
Bases: Transform
Calculates the discrete derivative of time series features.
Calculates the discrete derivative of time series features using either forward, backward, or central differences.
Initializes the DiscreteDerivative transform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
features
|
str | Iterable[str]
|
Features that shall be differentiated. Result features
will be named |
required |
method
|
DiscreteDerivativeKind
|
Method to use for calculating the derivative. Valid options are "forward", "backward", and "central". Defaults to "central". |
'central'
|
derivative_suffix
|
str
|
Suffix to append to the feature name for the resulting derivative feature. Defaults to "_derivative". |
'_derivative'
|
Source code in src/flowcean/polars/transforms/discrete_derivative.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|