Uniform#
- class cuqi.distribution.Uniform(low=None, high=None, is_symmetric=True, **kwargs)#
- __init__(low=None, high=None, is_symmetric=True, **kwargs)#
- Parameters:
low (float or array_like of floats) – Lower bound(s) of the uniform distribution.
high (float or array_like of floats) – Upper bound(s) of the uniform distribution.
Methods
__init__
([low, high, is_symmetric])Disable finite difference approximation for logd gradient.
enable_FD
([epsilon])Enable finite difference approximation for logd gradient.
Return the conditioning variables of this distribution (if any).
Return any public variable that is mutable (attribute or property) except those in the ignore_vars list
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 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
Returns True if finite difference approximation of the logd gradient is enabled.
Spacing for the finite difference approximation of the logd gradient.
Return the dimension of the distribution based on the geometry.
Return the geometry of the distribution.
Returns True if instance (self) is a conditional distribution.
Name of the random variable associated with the density.