class TransferOperatorModel

class deeptime.decomposition.TransferOperatorModel(koopman_matrix: ~numpy.ndarray, instantaneous_obs: ~typing.Callable[[~numpy.ndarray], ~numpy.ndarray] = <deeptime.basis._monomials.Identity object>, timelagged_obs: ~typing.Callable[[~numpy.ndarray], ~numpy.ndarray] = <deeptime.basis._monomials.Identity object>)

Model which contains a finite-dimensional transfer operator (or approximation thereof). It describes the temporal evolution of observable space, i.e.,

\[\mathbb{E}[g(x_{t+\tau})] = K^\top \mathbb{E}[f(x_t)], \]

where \(K\in\mathbb{R}^{n\times m}\) is the transfer operator, \(x_t\) the system’s state at time \(t\), and \(f\) and \(g\) observables of the system’s state.

Parameters:
  • koopman_matrix ((n, n) ndarray) – Applies the transform \(K^\top\) in the modified basis.

  • instantaneous_obs (Callable, optional, default=identity) – Transforms the current state \(x_t\) to \(f(x_t)\). Defaults to f(x) = x.

  • timelagged_obs (Callable, optional, default=identity) – Transforms the future state \(x_{t+\tau}\) to \(g(x_{t+\tau})\). Defaults to f(x) = x.

Attributes

instantaneous_obs

Transforms the current state \(x_t\) to \(f(x_t)\).

koopman_matrix

Same as operator.

operator

The operator \(K\) so that \(\mathbb{E}[g(x_{t+\tau})] = K^\top \mathbb{E}[f(x_t)]\) in transformed bases.

operator_inverse

Inverse of the operator \(K\), i.e., \(K^{-1}\).

output_dimension

The dimension of data after propagation by \(K\).

timelagged_obs

Transforms the future state \(x_{t+\tau}\) to \(g(x_{t+\tau})\).

Methods

backward(data[, propagate])

Maps data backward in time.

copy()

Makes a deep copy of this model.

forward(data[, propagate])

Maps data forward in time.

get_params([deep])

Get the parameters.

set_params(**params)

Set the parameters of this estimator.

transform(data, **kw)

Transforms data by applying the observables to it and then mapping them onto the modes of \(K\).

__call__(*args, **kwargs)

Call self as a function.

backward(data: ndarray, propagate=True)

Maps data backward in time.

Parameters:
  • data ((T, n) ndarray) – Input data

  • propagate (bool, default=True) – Whether to apply the Koopman operator to the featurized data.

Returns:

mapped_data – Mapped data.

Return type:

(T, m) ndarray

copy() Model

Makes a deep copy of this model.

Returns:

A new copy of this model.

Return type:

copy

forward(data: ndarray, propagate=True)

Maps data forward in time.

Parameters:
  • data ((T, n) ndarray) – Input data

  • propagate (bool, default=True) – Whether to apply the Koopman operator to the featurized data.

Returns:

mapped_data – Mapped data.

Return type:

(T, m) ndarray

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: ndarray, **kw)

Transforms data by applying the observables to it and then mapping them onto the modes of \(K\).

Parameters:

data ((T,n) ndarray) – Input data.

Returns:

transformed_data – The transformed data.

Return type:

(T,m) ndarray

property instantaneous_obs: Callable[[ndarray], ndarray]

Transforms the current state \(x_t\) to \(f(x_t)\). Defaults to f(x) = x.

property koopman_matrix: ndarray

Same as operator.

property operator: ndarray

The operator \(K\) so that \(\mathbb{E}[g(x_{t+\tau})] = K^\top \mathbb{E}[f(x_t)]\) in transformed bases.

property operator_inverse: ndarray

Inverse of the operator \(K\), i.e., \(K^{-1}\). Potentially pseudo-inverse instead of true inverse.

property output_dimension

The dimension of data after propagation by \(K\).

property timelagged_obs: Callable[[ndarray], ndarray]

Transforms the future state \(x_{t+\tau}\) to \(g(x_{t+\tau})\). Defaults to f(x) = x.