Log_prob while sampling

Hi, is it possible to obtain the log_prob while sampling using MCMC?

the log_prob of what?

log_prob of the MCMC samples under the posterior distribution that we are trying to estimate.

i don’t think that’s what you mean? in general that would require computing a normalization constant that MCMC does not/cannot compute

I guess @madhav wants to record log_density of a model while sampling. It can be obtained by specify extra_fields=('potential_energy',) like in MCMC docs.

Thanks, @fehiepsi, for answering! Also, @martinjankowiak, for replying!