Closed
Description
Following up from #3134. The previous PR only added model_logp
for NUTS and HMC. Apart from them, no other sampler computes the logp (e.g. the Metropolis samplers only computes the delta_logp
), so there would be overhead to require these samplers to track the logp.
Quoting @junpenglao:
I have an idea to do this also for Metropolis where we are computing the delta_logp instead of the logp. We can compute the model logp at sample 0, then from sample 1 onward we do state.logp = logp_tm1 - delta_logp which should recover the logp at time t while also cheap to compute.
We should decide what samplers should support exporting the logp (i.e. which samplers already do this, or something close to it).
Metadata
Metadata
Assignees
Labels
No labels