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:
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.

Returns:
Variable or list of Variable

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.

varlogp

convenience property for logp of all free (unobserved) RVs.

varlogp_nojac

convenience property for logp of all free (unobserved) RVs without transformation corrections.

observedlogp

convenience property for logp of all observed RVs.

potentiallogp

convenience property for all additional logp terms (potentials).

point_logps

convenience property for numerical evaluation of local logps at a point.