previous sample not appended upon rejection?
YilunZhou opened this issue · comments
If my understanding about HMC (and MH in general) is correct, if the new sample (i.e. proposal) is not accepted, the previous sample should be duplicated in the sample list. However, it looks like this duplication is not done. Specifically, on
hamiltorch/hamiltorch/samplers.py
Line 476 in 74e190b
Hi,
Thanks for finding that. You are correct and I have now fixed the sampler.
If you wanted to git pull and add a small comment like "# Ensure rejected sample is duplicated" above
hamiltorch/hamiltorch/samplers.py
Line 481 in 9e5c672
and submit a pull request, then I can accept your pull request and you will be down as a contributor. That way I can ensure this fix is attributed to you (if that is something you would like).
Thanks once again!
Adam