class KVAD¶
- class deeptime.decomposition.KVAD(kernel: ~deeptime.kernels._base.Kernel, lagtime: ~typing.Optional[int] = None, dim: ~typing.Optional[int] = None, epsilon: float = 1e-06, observable_transform: ~typing.Callable[[~numpy.ndarray], ~numpy.ndarray] = <deeptime.basis._monomials.Identity object>)¶
An estimator for the “Kernel embedding based variational approach for dynamical systems” (KVAD).
Theory and introduction into the method can be found in [1].
- Parameters:
kernel (Kernel) – The kernel to be used, see
deeptime.kernels
for a selection of predefined kernels.lagtime (int, optional, default=None) – Lagtime if data is not a list of instantaneous and time-lagged data pairs but a trajectory instead.
dim (int, optional, default=None) – Dimension cutoff parameter.
epsilon (float, default=1e-6) – Regularization parameter for truncated SVD.
observable_transform (callable, optional, default=Identity) – A feature transformation on the raw data which is used to estimate the model.
See also
References
Attributes
Dimension cutoff for the decomposition.
Regularization parameter for truncated SVD.
Property reporting whether this estimator contains an estimated model.
Shortcut to
fetch_model()
.Transforms observable instantaneous and time-lagged data into feature space.
Methods
Yields the estimated model.
fit
(data, **kwargs)Fits data to the estimator's internal
Model
and overwrites it.fit_fetch
(data, **kwargs)Fits the internal model on data and subsequently fetches it in one call.
fit_transform
(data[, fit_options, ...])Fits a model which simultaneously functions as transformer and subsequently transforms the input data.
get_params
([deep])Get the parameters.
set_params
(**params)Set the parameters of this estimator.
transform
(data, **kwargs)Transforms data with the encapsulated model.
- __call__(*args, **kwargs)¶
Call self as a function.
- fetch_model() Optional[Model] ¶
Yields the estimated model. Can be None if
fit()
was not called.- Returns:
model – The estimated model or None.
- Return type:
Model or None
- fit(data, **kwargs)¶
Fits data to the estimator’s internal
Model
and overwrites it. This way, every call tofetch_model()
yields an autonomous model instance. Sometimes apartial_fit
method is available, in which case the model can get updated by the estimator.- Parameters:
data (array_like) – Data that is used to fit a model.
**kwargs – Additional kwargs.
- Returns:
self – Reference to self.
- Return type:
- fit_fetch(data, **kwargs)¶
Fits the internal model on data and subsequently fetches it in one call.
- Parameters:
data (array_like) – Data that is used to fit the model.
**kwargs – Additional arguments to
fit()
.
- Returns:
The estimated model.
- Return type:
model
- fit_transform(data, fit_options=None, transform_options=None)¶
Fits a model which simultaneously functions as transformer and subsequently transforms the input data. The estimated model can be accessed by calling
fetch_model()
.- Parameters:
data (array_like) – The input data.
fit_options (dict, optional, default=None) – Optional keyword arguments passed on to the fit method.
transform_options (dict, optional, default=None) – Optional keyword arguments passed on to the transform method.
- Returns:
output – Transformed data.
- Return type:
array_like
- get_params(deep=False)¶
Get the parameters.
- Returns:
params – Parameter names mapped to their values.
- Return type:
mapping of string to any
- set_params(**params)¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters:
**params (dict) – Estimator parameters.
- Returns:
self – Estimator instance.
- Return type:
object
- transform(data, **kwargs)¶
Transforms data with the encapsulated model.
- Parameters:
data (array_like) – Input data
**kwargs – Optional arguments.
- Returns:
output – Transformed data.
- Return type:
array_like
- property dim: Optional[int]¶
Dimension cutoff for the decomposition.
- Type:
int or None
- property epsilon¶
Regularization parameter for truncated SVD.
- Type:
float
- property has_model: bool¶
Property reporting whether this estimator contains an estimated model. This assumes that the model is initialized with None otherwise.
- Type:
bool
- property model¶
Shortcut to
fetch_model()
.
- property observable_transform: Callable[[ndarray], ndarray]¶
Transforms observable instantaneous and time-lagged data into feature space.
- Type:
Callable[[ndarray], ndarray]