MultipleLikelihoodPosterior#
- class cuqi.distribution.MultipleLikelihoodPosterior(*densities)#
A posterior distribution with multiple likelihoods and a single prior.
- Parameters:
densities (
Distribution
orLikelihood
) – The densities that make up the Posterior. Must include at least three densities. For a simple Likelihood and prior usePosterior
instead.
Notes
This acts like a regular distribution with a single parameter vector. Behind-the-scenes it is a joint posterior distribution with multiple likelihoods and a single prior. This is mostly intended to be used by samplers that are not able to handle joint distributions. See
JointDistribution
for more details on the joint distribution.- __init__(*densities)#
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__
(*densities)Initialize the core properties of the distribution.
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).
get_density
(name)Return a density with the given name.
Return any public variable that is mutable (attribute or property) except those in the ignore_vars list
Returns the parameter names of the joint distribution.
gradient
(*args, **kwargs)Return the gradient of the un-normalized log density function.
logd
(*args, **kwargs)Evaluate the un-normalized log density function.
logpdf
(*args, **kwargs)Evaluate the log probability density function of the distribution.
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.
The geometry of the distribution.
Returns True if instance (self) is a conditional distribution.
Return the likelihoods of the posterior.
Return the forward models that make up the posterior.
Name of the random variable associated with the density.
Return the prior distribution of the posterior.