pymc.model.core.Model.logp#
- Model.logp(vars=None, jacobian=True, sum=True)[source]#
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.
- vars
- Returns:
See also
compile_logp()log-probability density as a compiled function.
dlogp()gradient of log-probability density as a Variable (in a symbolic form).
d2logp()Hessian of log-probability density as a Variable (in a symbolic form).
logp_dlogp_function()compile logp and its gradient as a single function.
varlogpconvenience property for logp of all free (unobserved) RVs.
varlogp_nojacconvenience property for logp of all free (unobserved) RVs without transformation corrections.
observedlogpconvenience property for logp of all observed RVs.
potentiallogpconvenience property for all additional logp terms (potentials).
point_logpsconvenience property for numerical evaluation of local logps at a point.