Class Koopman
The class Koopman
is a mapping \(K: \mathrm{span}(\Psi) \rightarrow \mathrm{span}(\Psi)\),
which acts as the finite-dimensional approximation of the Koopman operator \(\mathcal{K}\),
i.e.,
Given \(\phi = \mathbf{a}^T \Psi\), where \(\mathbf{a} \in \mathbb{R}^{N_{\psi}}\), then the application of \(\mathcal{K}\) satisfies
Info
Understanding the __call__
method of Koopman
: Given the data set \(\{x^{(n)}\}_{n = 1}^N\),
it represents a mapping:
API Documentation¶
__call__(x, u)
¶
Apply the Koopman operator \(K(x)\), here the input \(u\) is ignored.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
The input dictionary basis of the size \((N, N_{\psi})\). |
required |
u
|
Tensor
|
Ignored |
required |
Returns:
Type | Description |
---|---|
Tensor
|
Applied the Koopman operator, it's of the size \((N, N_{\psi})\). |
__init__(K)
¶
Initialize the Koopman instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
K
|
Tensor
|
The Koopman matrix of the size \((N_{\psi}, N_{\psi})\) |
required |
load(path)
¶
Load the Koopman operator from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to load the Koopman operator. |
required |
save(path)
¶
Save the Koopman operator to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to save the Koopman operator. |
required |
step(x, u)
¶
Consider the Koopman operator as a step function \Psi_{n+1} = K \Psi_n.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Tensor
|
The input dictionary basis of the size \((N, N_{\psi})\). |
required |
u
|
Tensor
|
Ignored |
required |
Returns:
Type | Description |
---|---|
Tensor
|
Applied the Koopman operator, it's of the size \((N, N_{\psi})\). |