Likelihood Specification and DensityDist

Hi,
You can find some of the details about DensityDist here:Probability Distributions in PyMC3 — PyMC3 3.11.2 documentation.

It requires the total log probability. This is not the log-likelihood, it is just the log probability evaluated at some value(s).

You can then use the custom distribution when specifying a likelihood. In this case, the values you pass are the observed values and the defined distribution takes on the role of the likelihood.

If you were to pass in any value of a random variable from that distribution, it would provide the log probability of obtaining that variable.

1 Like