MODWT.transform#
- MODWT.transform(endog)[source]#
Decompose a series.
Runs the pyramid to the requested depth, inverts each level for the multiresolution components, and computes the unbiased wavelet variance with its degrees of freedom.
- Parameters:
endog (
ArrayLike) – The(T,)series, at least 32 observations.- Return type:
- Returns:
The
MODWTResult.- Raises:
DimensionError – If the series is not one-dimensional.
SpecificationError – If the series is shorter than 32, or shorter than the requested depth allows.
Example
>>> rng = np.random.default_rng(0) >>> y = rng.standard_normal(256) >>> res = MODWT(levels=4).transform(y) >>> res.coefficients.shape, res.scaling.shape, res.wavelet, res.nobs ((4, 256), (256,), 'la8', 256) >>> MODWT(levels=6).transform(y) Traceback (most recent call last): ... cultivars.exceptions.SpecificationError: 6 levels of the la8 wavelet exceed what 256 ...