Skip to content

Distributions

GaussianDistribution

GaussianDistribution(loc=None, scale=None)

Bases: Distribution

Multivariate Gaussian distribution with a linear operator scale matrix.

Parameters:

  • loc (Optional[Float[Array, ' N']], default: None ) –

    the mean of the distribution as an array of shape (n_points,).

  • scale (Optional[LinearOperator], default: None ) –

    the scale matrix of the distribution as a LinearOperator object.

event_shape property

event_shape

Returns the event shape.

mean

mean()

Calculates the mean.

median

median()

Calculates the median.

mode

mode()

Calculates the mode.

covariance

covariance()

Calculates the covariance matrix.

variance

variance()

Calculates the variance.

stddev

stddev()

Calculates the standard deviation.

entropy

entropy()

Calculates the entropy of the distribution.

log_prob

log_prob(y)

Calculates the log pdf of the multivariate Gaussian.

Parameters:

  • y (Float[Array, ' N']) –

    the value of which to calculate the log probability.

Returns:

  • ScalarFloat –

    The log probability of the value as a scalar array.

sample

sample(seed, sample_shape)

See Distribution.sample.