Diffusion prior
This section contains some utilties for defining the of the observations
Diffusion prior base class
- class svise.sde_learning.DiffusionPrior(d: int, Q: Tensor)[source]
Abstract base class for diffusion prior. This class assumes that diffusion is constant.
- Parameters:
d (int) – number of states
Q (Tensor) – Diffusion matrix init
- abstract property kl_divergence: Tensor
Returns the kl-divergence between the approx. posterior and the prior
- Returns:
kl-div between approx. posterior and the prior
- Return type:
Tensor
- abstract property process_noise: Tensor
Returns the full process nosie matrix (L Q L^T )
- Returns:
full process noise matrix
- Return type:
Tensor
Diagonal diffusion prior base class
- class svise.sde_learning.DiagonalDiffusionPrior(d: int, Q: Tensor)[source]
Base class for the case that the diffusion matrix is diagonal.
- Parameters:
d (int) – number of states
Q (Tensor) – Diffusion matrix init
- abstract property process_noise_diag: Tensor
Returns the diagonal elements of the process noise term
- Returns:
returns diagonal element of the process noise term
- Return type:
Tensor
Constant diagonal diffusion prior
- class svise.sde_learning.ConstantDiagonalDiffusionPrior(d: int, Q_diag: Tensor)[source]
Class for the case the diffusion matrix is known and constant (i.e. won’t be tuned during training):
- Parameters:
d (int) – number of states
Q_diag (Tensor) – diagonal component of diffusion matrix
- property kl_divergence: Tensor
Returns the kl-divergence between the approx. posterior and the prior
- Returns:
kl-div between approx. posterior and the prior
- Return type:
Tensor
- property process_noise: Tensor
Returns the full process nosie matrix (L Q L^T )
- Returns:
full process noise matrix
- Return type:
Tensor
- property process_noise_diag: Tensor
Returns the diagonal elements of the process noise term
- Returns:
returns diagonal element of the process noise term
- Return type:
Tensor
Sparse diagonal diffusion prior
- class svise.sde_learning.SparseDiagonalDiffusionPrior(d: int, Q_diag: Tensor, n_reparam_samples: int, tau: float)[source]
Prior over the diffusion matrix is a sparse diagonal matrix.
- Parameters:
d (int) – number of states
Q_diag (Tensor) – the starting value of the dispersion matrix
n_reparam_samples (int) – number of reparametrization samples to use
tau (float) – global scaling parameter
- property kl_divergence: Tensor
Returns the kl-divergence between the approx. posterior and the prior
- Returns:
kl-div between approx. posterior and the prior
- Return type:
Tensor
- property process_noise: Tensor
Returns the full process nosie matrix (L Q L^T )
- Returns:
full process noise matrix
- Return type:
Tensor
- property process_noise_diag: Tensor
Returns the diagonal elements of the process noise term
- Returns:
returns diagonal element of the process noise term
- Return type:
Tensor