Normal

class pmrf.distributions.Normal(loc: Array, scale: Array)

Bases: AbstractProbDistribution

Normal distribution with location loc and scale parameters.

Initializes a Normal distribution.

Arguments:

  • loc: Mean of the distribution.

  • scale: Standard deviation of the distribution.

cdf(value: Array) Array

See Distribution.cdf.

entropy() Array

Calculates the Shannon entropy (in nats).

icdf(value: Array) Array

See Distribution.icdf.

kl_divergence(other_dist, **kwargs) Array

Calculates the KL divergence to another distribution.

Arguments:

  • other_dist: A compatible disteqx distribution.

  • kwargs: Additional kwargs.

Returns:

The KL divergence KL(self || other_dist).

log_cdf(value: Array) Array

See Distribution.log_cdf.

log_prob(value: Array) Array

See Distribution.log_prob.

log_survival_function(value: Array) Array

See Distribution.log_survival_function.

mean() Array

Calculates the mean.

median() Array

Calculates the median.

mode() Array

Calculates the mode.

sample(key: Key[jaxlib._jax.Array, '']) Array

See Distribution.sample.

sample_and_log_prob(key: Key[jaxlib._jax.Array, '']) tuple[Array, Array]

See Distribution.sample_and_log_prob.

stddev() Array

Calculates the standard deviation.

survival_function(value: Array) Array

See Distribution.survival_function.

variance() Array

Calculates the variance.

property event_shape: tuple[int, ...]

Shape of event of distribution samples.

loc: Array
scale: Array