1
$\begingroup$

From my understanding the energy function needs only be specified such that it is proportional to the log density, and not specifying the normalizing constant should not greatly impact the sampling process. I am trying to generate a sample from a piece-wise normal distribution using the HMC code written by Radford Neal in R. The sampling is perfect when I specified the normalizing constant but bad when I do not. Here's a graphical comparison 5000 iter, step=100, stepsize= 0.2 5000 iter, step=100, stepsize= 0.2

Is the discontinuity in the density the main cause here? It worked fine when I tried simple distributions that do not have discontinuities.

$\endgroup$
  • $\begingroup$ What is the distribution which you're trying to sample from here? $\endgroup$ – πr8 Jul 30 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.