Posterior
Instances of Posterior are called by worker sampling
processes for evaluation of a joint posterior distribution.
- class xpsi.Posterior.Posterior(likelihood, prior, **kwargs)[source]
The (joint) posterior distribution.
A callable instance is required by emcee (but is not required for nested sampling).
- Parameters:
likelihood – An instance of
Likelihood.prior – An instance of
Prior.
- __call__(p)[source]
Special method to make callable instances to feed to
emcee.- Returns:
The logarithm of the posterior density (up to a normalising constant), evaluated at
p.
- property likelihood
Get the likelihood object.
- loglikelihood(p)[source]
The logarithm of the likelihood function, evaluated at
p.Companion to
logprior()for parallel-tempered sampling; see_evaluate_split().- Returns:
The logarithm of the likelihood.
ptemceeonly requires it where the log-prior is finite.
- logprior(p)[source]
The logarithm of the prior density, evaluated at
p.Companion to
loglikelihood()for parallel-tempered sampling; see_evaluate_split().- Returns:
The logarithm of the prior density (up to a normalising constant), or minus infinity if
plies outside the strict parameter bounds.
- property prior
Get the prior object.