HilbertTransformer
Extract instantaneous features from a time series via Hilbert transform.
Computes the analytic signal using the Hilbert transform and returns one of several derived representations: the amplitude envelope, instantaneous phase, instantaneous frequency, the quadrature component, or all three main features as a multi-column DataFrame.
Wraps scipy.signal.hilbert.
Quickstart
from sktime.transformations.hilbert import HilbertTransformer
estimator = HilbertTransformer(output_type='envelope', N=None, unwrap_phase=True, fs=1.0)Tags
Capabilities
- Multivariate
- Unequal-length series
- Inverse transform: Not supported
- Missing values: Not supported
- Removes missing values: Not supported
- Equalizes series length: Not supported
Properties
- Input typescitype:transform-input
- Series
- Output typescitype:transform-output
- Series
- Label typescitype:transform-labels
- None
- Fit is emptyfit_is_empty
- Yes
- Keeps the time indextransform-returns-same-time-index
- Yes
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(4)
- output_typestr, default=”envelope”
Which feature to extract. One of:
"envelope": instantaneous amplitude,|z(t)|"phase": unwrapped instantaneous phase in radians"frequency": instantaneous frequency in cycles per sample"quadrature": imaginary part of the analytic signal"all": envelope, phase and frequency as separate columns
- Nint or None, default=None
Number of Fourier components (FFT length). If
None, defaults to the length of the input.- unwrap_phasebool, default=True
- Whether to unwrap the phase to remove 2-pi discontinuities.
- fsfloat, default=1.0
Sampling frequency, used to scale instantaneous frequency into physical units (Hz) when
output_typeis"frequency"or"all".
Examples
>>> from sktime.transformations.hilbert import HilbertTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> t = HilbertTransformer (output_type = "envelope")
>>> y_envelope = t. fit_transform (y)