I want to evaluate the log posterior (ideally separately the log prior and log likelihood) values at sample points and at some manually entered points (e.g. the true parameter value points for synthetic datasets). How can I achieve this in PyMC3?
Update:
I've found the logp()
method, however it's not very convenient to use for multiple points. Is are there some standard / idiomatic approach?
Update:
This [y.logp(trace[i]) for i in range(len(trace))]
works, but is superslow.
Update:
Slowness was caused by the fact that y
is the observed random variable, calling logp
method of the model works fast.