TruncatedNormal
- class pmrf.distributions.TruncatedNormal(loc: Array, scale: Array, low: Array, high: Array)
Bases:
AbstractProbDistributionTruncated Normal distribution with loc, scale, low, and high parameters.
Initializes a Truncated Normal distribution.
Arguments:
loc: Mean of the untruncated distribution.
scale: Standard deviation of the untruncated distribution.
low: Lower bound of the truncation.
high: Upper bound of the truncation.
- 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.
- Raises:
NotImplementedError: The KL divergence between arbitrary truncated normal distributions lacks a stable general analytical solution.
- 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.
- high: Array
- loc: Array
- low: Array
- scale: Array
- property support: tuple[Array, Array]
See Distribution.support.