Skip to content

Uniform¤

distreqx.distributions.Uniform(distreqx.distributions.AbstractSTDDistribution, distreqx.distributions.AbstractSurvivalDistribution) ¤

Uniform distribution with low and high parameters.

dtype property ¤

Data type of a sample

name property ¤

Distribution name.

cross_entropy(other_dist, **kwargs) -> Array ¤

Calculates the cross entropy to another distribution.

Arguments:

  • other_dist: A compatible distreqx Distribution.
  • kwargs: Additional kwargs.

Returns:

  • The cross entropy H(self || other_dist).
log_survival_function(value: PyTree[Array]) -> PyTree[Array] ¤

Evaluates the log of the survival function at value.

Note that by default we use a numerically not necessarily stable definition of the log of the survival function in terms of the CDF. More stable definitions should be implemented in subclasses for distributions for which they exist.

Arguments:

  • value: An event.

Returns:

  • The log of the survival function evaluated at value, i.e. log P[X > value]
stddev() -> PyTree[Array] ¤

Calculate the standard deviation.

survival_function(value: PyTree[Array]) -> PyTree[Array] ¤

Evaluates the survival function at value.

Note that by default we use a numerically not necessarily stable definition of the survival function in terms of the CDF. More stable definitions should be implemented in subclasses for distributions for which they exist.

Arguments:

  • value: An event.

Returns:

  • The survival function evaluated at value, i.e. P[X > value]