UnboundedUniform#

class cuqi.distribution.UnboundedUniform(geometry, is_symmetric=True, **kwargs)#

Unbounded uniform distribution. This is a special case of the Uniform distribution, where the lower and upper bounds are set to -inf and inf, respectively. This distribution is not normalizable, and therefore cannot be sampled from. It is mainly used for initializing non-informative priors. :param geometry: The geometry of the distribution. If an integer is given, it is

interpreted as the dimension of the distribution. If a Geometry object is given, its par_dim attribute is used.

__init__(geometry, is_symmetric=True, **kwargs)#

Initialize the core properties of the distribution.

Parameters:
  • name (str, default None) – Name of distribution.

  • geometry (Geometry, default _DefaultGeometry (or None)) – Geometry of distribution.

  • is_symmetric (bool, default None) – Indicator if distribution is symmetric.

Methods

__init__(geometry[, is_symmetric])

Initialize the core properties of the distribution.

disable_FD()

Disable finite difference approximation for logd gradient.

enable_FD([epsilon])

Enable finite difference approximation for logd gradient.

get_conditioning_variables()

Return the conditioning variables of this distribution (if any).

get_mutable_variables()

Return any public variable that is mutable (attribute or property) except those in the ignore_vars list

get_parameter_names()

Returns the names of the parameters that the density can be evaluated at or conditioned on.

gradient(x)

Computes the gradient of logpdf at the given values of x.

logd(*args, **kwargs)

Evaluate the un-normalized log density function of the distribution.

logpdf(x)

Evaluate the logarithm of the unnormalized PDF at the given values of x.

pdf(x)

Evaluate the log probability density function of the distribution.

sample([N])

Sample from the distribution.

to_likelihood(data)

Convert conditional distribution to a likelihood function given observed data

Attributes

FD_enabled

Returns True if finite difference approximation of the logd gradient is enabled.

FD_epsilon

Spacing for the finite difference approximation of the logd gradient.

dim

Return the dimension of the distribution based on the geometry.

geometry

Return the geometry of the distribution.

is_cond

Returns True if instance (self) is a conditional distribution.

name

Name of the random variable associated with the density.

rv

Return a random variable object representing the distribution.