spey.backends.distributions.MultivariateNormal

spey.backends.distributions.MultivariateNormal#

class spey.backends.distributions.MultivariateNormal(mean: ndarray, cov: ndarray, weight: Callable[[ndarray], float] | float = 1.0, domain: slice = slice(None, None, None))[source]#

Multivariate normal distribution

Parameters:
  • mean (np.ndarray) – Mean of the distribution.

  • cov (np.ndarray) – Symmetric positive (semi)definite covariance matrix of the distribution.

  • weight (Callable[[np.ndarray], float] or float, default 1.0) – weight of the distribution.

  • domain (slice, default slice(None, None)) – set of parameters to be used within the distribution.

__init__(mean: ndarray, cov: ndarray, weight: Callable[[ndarray], float] | float = 1.0, domain: slice = slice(None, None, None))[source]#

Methods

__init__(mean, cov[, weight, domain])

expected_data()

The expectation value of the Multivariate Normal distribution.

log_prob(value)

Compute log-probability

sample(value, sample_size)

Generate samples

Attributes

mean

Mean of the distribution.

cov

Symmetric positive (semi)definite covariance matrix of the distribution.

weight

Weight of the distribution

domain

Which parameters should be used during the computation of the pdf