VmdTransformer
VmdTransformer
- class VmdTransformer(K=None, kMax=30, alpha=2000, tau=0.0, DC=0, init=1, tol=1e-07, energy_loss_coefficient=0.01, returned_decomp='u')[source]
Variational Mode Decomposition transformer.
An implementation of the Variational Mode Decomposition method (2014) [1], based on the
vmdpypackage [3] byvrcarva, which in turn is based on the original MATLAB implementation by Dragomiretskiy and Zosso [1].This transformer is the official continuation of the
vmdpypackage, maintained insktime.VMD is an decomposition (series-to-series) transformer which uses the Variational Mode Decomposition method to decompose an original time series into multiple Intrinsic Mode Functions. The number of Intrinsic Mode Functions created depend on the K parameter and should be optimally defined if known. If the K parameter is unknown, this transformer will attempt to find a good estimate of it by comparing the original time series against the reconstruction of the signals using the energy loss coefficient, default of 0.01.
This is useful if you have a complex series and want to decompose it into easier-to-learn IMF’s, which when summed together make up an estimate of the original time series with some loss of information.
- Parameters:
- Kint, optional (default=’None’)
the number of Intrinsic Mode Functions to decompose original series to. If None, will decompose the series iteratively with increasing K, until kMax is reached or the sum of the decomposed modes against the original series is less than the
energy_loss_coefficientparameter (whichever occurs earlier). In this case, the lowest K to satisfy one of the condition is used intransform.- kMaxint, optional (default=30)
the limit on the number of Intrinsic Mode Functions to decompose the original series to if the
energy_loss_coefficienthasn’t been reached. Only used ifKisNone, ignored otherwise.- alphaint, optional (default=2000)
bandwidth constraint for the generated Intrinsic Mode Functions, balancing parameter of the data-fidelity constraint
- tauint, optional (default=0.)
noise tolerance of the generated modes, time step of dual ascent
- DCint, optional (default=0)
Imposed DC parts
- initint, optional (default=1)
parameter for omegas, default of one will initialize the omegas uniformly, 1 = all omegas initialized uniformly 0 = all omegas start at 0, 2 = all omegas are initialized at random
- tolint, optional (default=1e-7)
convergence tolerance criterion
- energy_loss_coefficientint, optional (default=0.01)
decides the acceptable loss of information from the original series when the decomposed modes are summed together as calculated by the energy loss coefficient. Only used if
KisNone, ignored otherwise.- returned_decompbool, optional (default=”u”)
which decomposition object is returned by
transform"u": the decomposed modes"u_hat": the mode spectra (absolute values)"u_both": both the decomposed modes and the mode spectra, these will be returned column concatenated, first the modes then the spectra
- Attributes:
is_fittedWhether
fithas been called.
References
[1] (1,2)K. Dragomiretskiy and D. Zosso, - Variational Mode Decomposition: IEEE Transactions on Signal Processing, vol. 62, no. 3, pp. 531-544, Feb.1, 2014, doi: 10.1109/TSP.2013.2288675.
[2]Vinícius R. Carvalho, Márcio F.D. Moraes, Antônio P. Braga, Eduardo M.A.M. Mendes - Evaluating five different adaptive decomposition methods for EEG signal seizure detection and classification, Biomedical Signal Processing and Control, Volume 62, 2020, 102073, ISSN 1746-8094 https://doi.org/10.1016/j.bspc.2020.102073.
Examples
>>> from sktime.transformations.vmd import VmdTransformer >>> from sktime.datasets import load_solar >>> y = load_solar() >>> transformer = VmdTransformer() >>> modes = transformer.fit_transform(y)
VmdTransformer can be used in a forecasting pipeline, to decompose, forecast individual components, then recompose: >>> from sktime.forecasting.trend import TrendForecaster # doctest: +SKIP >>> pipe = VmdTransformer() * TrendForecaster() # doctest: +SKIP >>> pipe.fit(y, fh=[1, 2, 3]) # doctest: +SKIP >>> y_pred = pipe.predict() # doctest: +SKIP
Methods
check_is_fitted([method_name])Check if the estimator has been fitted.
clone()Obtain a clone of the object with same hyper-parameters and config.
clone_tags(estimator[, tag_names])Clone tags from another object as dynamic override.
create_test_instance([parameter_set])Construct an instance of the class, using first test parameter set.
create_test_instances_and_names([parameter_set])Create list of all test instances and a list of names for them.
fit(X[, y])Fit transformer to X, optionally to y.
fit_transform(X[, y])Fit to data, then transform it.
get_class_tag(tag_name[, tag_value_default])Get class tag value from class, with tag level inheritance from parents.
get_class_tags()Get class tags from class, with tag level inheritance from parent classes.
get_config()Get config flags for self.
get_fitted_params([deep])Get fitted parameters.
get_param_defaults()Get object's parameter defaults.
get_param_names([sort])Get object's parameter names.
get_params([deep])Get a dict of parameters values for this object.
get_tag(tag_name[, tag_value_default, ...])Get tag value from instance, with tag level inheritance and overrides.
get_tags()Get tags from instance, with tag level inheritance and overrides.
get_test_params([parameter_set])Return testing parameter settings for the estimator.
inverse_transform(X[, y])Inverse transform X and return an inverse transformed version.
is_composite()Check if the object is composed of other BaseObjects.
load_from_path(serial)Load object from file location.
load_from_serial(serial)Load object from serialized memory container.
reset()Reset the object to a clean post-init state.
save([path, serialization_format])Save serialized self to bytes-like object or to (.zip) file.
set_config(**config_dict)Set config flags to given values.
set_params(**params)Set the parameters of this object.
set_random_state([random_state, deep, ...])Set random_state pseudo-random seed parameters for self.
set_tags(**tag_dict)Set instance level tag overrides to given values.
transform(X[, y])Transform X and return a transformed version.
update(X[, y, update_params])Update transformer with X, optionally y.

