utils.integrands.gaussian module

class DiagonalGaussianIntegrand(*args, **kwargs)[source]

Bases: utils.integrands.abstract.Integrand

N-dimensional gaussian with a diagonal covariance matrix

Parameters
  • mu (float or torch.Tensor) – Mean of the gaussian. Either a scalar or a vector of size d

  • s (float or torch.Tensor) – Standard deviation of the gaussian. Either a scalar or a vector of size d

  • norm (float or torch.Tensor) – Prefactor of the gaussian. Must be a scalar.

  • device (torch.device) – Default device where the parameters are stored

Notes

Correct value in 2D with standard params: 0.031415898(81)

evaluate_integrand(x)[source]

Compute the gaussian

The parameters of the gaussian are sent to the device of the input

Parameters

x (torch.Tensor) – Batch of points of size `(*,d)`

Returns

Return type

torch.Tensor

class KnownGaussianIntegrand(*args, **kwargs)[source]

Bases: utils.integrands.abstract.KnownIntegrand, utils.integrands.gaussian.DiagonalGaussianIntegrand

N-dimensional guassian integrand whose integral over the unit hypercube is provided using the Error Function as implemented in pytorch

Parameters
  • mu (float or torch.Tensor) – Mean of the gaussian. Either a scalar or a vector of size d

  • s (float or torch.Tensor) – Standard deviation of the gaussian. Either a scalar or a vector of size d

  • norm (float or torch.Tensor) – Prefactor of the gaussian. Must be a scalar.

  • device (torch.device) – Default device where the parameters are stored

Notes

Correct value in 2D with standard params: 0.031415898(81)

static erf(x)[source]

Returns the integral of exp(-x^2) between 0 and 1.

integral()[source]

Compute the 1D integral of a gaussian over the unit interval [0,1]

class RegulatedDiagonalGaussianIntegrand(*args, **kwargs)[source]

Bases: utils.integrands.abstract.RegulatedIntegrand, utils.integrands.gaussian.DiagonalGaussianIntegrand

N-dimensional regulated gaussian with a diagonal covariance matrix

Parameters
  • mu (float or torch.Tensor) – Mean of the gaussian. Either a scalar or a vector of size d

  • s (float or torch.Tensor) – Standard deviation of the gaussian. Either a scalar or a vector of size d

  • norm (float or torch.Tensor) – Prefactor of the gaussian. Must be a scalar.

  • reg (float) – regularization constant

  • device (torch.device) – Default device where the parameters are stored

Notes

Correct value in 2D with standard params: 0.031416898(81)