pymc.model.core.Model.compile_logp#

Model.compile_logp(vars=None, jacobian=True, sum=True, **compile_kwargs)[source]#

Compiled joint log-probability density of the model or joint log-probability contributions.

Parameters:
varsVariable, sequence of Variable or None, default None

Random variables or potential terms whose contribution to logp is to be included. If None, use all basic (free or observed) variables and potentials defined in the model.

jacobianbool, default True

If True, add Jacobian contributions associated with automatic variable transformations, so that the result is the true density of transformed random variables. See pymc.distributions.transforms for details.

sumbool, default True

If True, return the sum of the relevant logp terms as a single Variable. If False, return a list of logp terms corresponding to vars.

**compile_kwargsdict

Extra arguments passed to self.compile_fn().

Returns:
PointFunc

The function expects as input a dictionary with the same structure as self.initial_point().

See also

logp()

log-probability density as a Variable (in a symbolic form).

compile_dlogp()

gradient of log-probability density as a compiled function.

compile_d2logp()

Hessian of log-probability density as a compiled function.