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:
- vars
Variable, sequence ofVariableorNone, defaultNone 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.transformsfor 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_kwargs
dict Extra arguments passed to
self.compile_fn().
- vars
- Returns:
PointFuncThe 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.