AdvancedMH.jl
AdvancedMH.jl copied to clipboard
Return accept/reject stat
Acceptance status should be included in the transition struct for easy calculations of rejection rates.
One issue with this is that propose
returns a Transition
object but acceptance is determined only in AbstractMCMC.step
. While I am not sure about backwards compatibility one could rename this object Sample
or ProposedSample
and introduce a new struct called Transition
which saves the proposed sample and the accepted sample (in some cases knowing which samples were rejected can be useful for debugging). Given that Transition
currently does not really store a transition this might clarify things a bit...
Additionally one could allow for user-defined Transition typed by templating some functions (eg. propose
), but I'm not sure if this would be worth the effort.
IMO one should just not return a Transition
object from propose
. When the Transition
is constructed, the log density is already evaluated which seems weird. This came up in a discussion with @mschauer before.