AdvancedMH.jl icon indicating copy to clipboard operation
AdvancedMH.jl copied to clipboard

Return accept/reject stat

Open cpfiffer opened this issue 4 years ago • 3 comments

Acceptance status should be included in the transition struct for easy calculations of rejection rates.

cpfiffer avatar Oct 14 '20 21:10 cpfiffer

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...

kaandocal avatar May 26 '21 13:05 kaandocal

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.

kaandocal avatar May 26 '21 14:05 kaandocal

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.

devmotion avatar May 26 '21 14:05 devmotion