skdh.features.JerkMetric#
- class skdh.features.JerkMetric#
The normalized sum of jerk. Assumes the input signal is acceleration, and therefore the jerk is the first time derivative of the input signal.
Methods
compute(signal[, fs, axis])Compute the jerk metric
Notes
Given an acceleration signal \(a\), the pre-normalized jerk metric \(\hat{J}\) is computed using a 2-point difference of the acceleration, then squared and summed per
\[\hat{J} = \sum_{i=2}^N\left(\frac{a_{i} - a_{i-1}}{\Delta t}\right)^2\]where \(\Delta t\) is the sampling period in seconds. The jerk metric \(J\) is then normalized using constants and the maximum absolute acceleration value observed per
\[s = \frac{360max(|a|)^2}{\Delta t}\]\[J = \frac{\hat{J}}{2s}\]- compute(signal, fs=1.0, *, axis=-1)#
Compute the jerk metric
- Parameters:
- signalarray-like
Array-like containing values to compute the jerk metric for.
- fsfloat, optional
Sampling frequency in Hz. If not provided, default is 1.0Hz
- axisint, optional
Axis along which the signal entropy will be computed. Ignored if signal is a pandas.DataFrame. Default is last (-1).
- Returns:
- jerk_metricnumpy.ndarray
Computed jerk metric.