nessai.flows.distributions
Distributions to use as the ‘base distribution’ for normalising flows.
Module Contents
Classes
A multivariate Normal with zero mean and specified covariance. |
|
Wrapper for ResampledGaussian. |
- class nessai.flows.distributions.MultivariateNormal(shape, var=1)
Bases:
glasflow.nflows.distributions.Distribution
A multivariate Normal with zero mean and specified covariance.
- Parameters:
- shapetuple
Shape of distribution, this is used to determine the number of dimensions.
- varfloat, optional
Variance of the distribution.
- class nessai.flows.distributions.ResampledGaussian(shape: int | tuple, acceptance_fn: Callable, eps: float = 0.05, truncation: int = 100, trainable: bool = False)
Bases:
glasflow.distributions.ResampledGaussian
Wrapper for ResampledGaussian.
Adds methods needed in nessai.
- end_iteration
Function to be called at the end of an iteration.
For LARS this updates the estimate of the normalisation constant independently of the other parameters in the flow.
- finalise(n_samples: int = 10000, n_batches: int = 10) None
Finalise the estimate of the normalisation constant.