VampLoss¶
- class kooplearn.torch.nn.VampLoss(schatten_norm: int = 2, center_covariances: bool = True)[source]¶
Bases:
ModuleVariational Approach for learning Markov Processes (VAMP) score by Wu and Noé [1].
\[\mathcal{L}(x, y) = -\sum_{i} \sigma_{i}(A)^{p} \qquad \text{where}~A = \big(x^{\top}x\big)^{\dagger/2}x^{\top}y\big(y^{\top}y\big)^{\dagger/2}.\]- Parameters:
schatten_norm (
int, optional) – Computes the VAMP-p score withp = schatten_norm.2. (Defaults to)
center_covariances (
bool, optional) – Use centered covariances to compute the VAMP score.True. (Defaults to)
Hint
Check out the Ordered MNIST example for a practical use of this loss function.
Methods
- forward(x: Tensor, y: Tensor) Tensor[source]¶
Forward pass of VAMP loss.
- Parameters:
x (
Tensor) – Features for x.y (
Tensor) – Features for y.
- Raises:
NotImplementedError – If
schatten_normis not 1 or 2.
- Shape:
x: \((N, D)\), where \(N\) is the batch size and \(D\) is the number of features.y: \((N, D)\), where \(N\) is the batch size and \(D\) is the number of features.
Hao Wu and Frank Noé. Variational approach for learning markov processes from time series data. Journal of Nonlinear Science, 30(1):23–66, August 2019. URL: https://doi.org/10.1007/s00332-019-09567-y, doi:10.1007/s00332-019-09567-y.