Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return accept/reject stat #38

Open
cpfiffer opened this issue Oct 14, 2020 · 3 comments
Open

Return accept/reject stat #38

cpfiffer opened this issue Oct 14, 2020 · 3 comments

Comments

@cpfiffer
Copy link
Member

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

@kaandocal
Copy link
Collaborator

kaandocal commented May 26, 2021

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
Copy link
Collaborator

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.

@devmotion
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants