-
Notifications
You must be signed in to change notification settings - Fork 18
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
Generally support container of proposals #58
Conversation
Looks good to me, I'll take another look after tests pass. |
Turned out that MALA required some fixes. I extracted the computation of the log acceptance probability to a separate function but I am going to revert it I think - it feels too hacky how it is used in the implementation of MALA, so I think it is cleaner to just implement |
proposal(-gradient_logdensity_candidate), state, candidate | ||
) - q(proposal(-gradient_logdensity_state), candidate, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not modified by this PR but I'm a bit confused why one uses proposal(-gradient_logdensity_candidate)
here even though the algorithm uses proposal(gradient_logdensity_candidate)
for sampling the proposal. I guess there's a simple explanation and I'm just too tired to see it right now 😴
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, honestly. @briandepasquale do you know why the negative is used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's open an issue and discuss it separately since it does not change the current implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi all. I recall that minus sign... Let me take a look. Yes perhaps within an issue is more appropriate. I will be a little slow though - I am deep in an academic job search right now and about to start interviewing, very time intensive and stressful. But hopefully won't be months, like my original PR :)
This PR addresses #38 (comment) (no implicit construction of
Transition
and computation of the log density when generating the proposal) and #53 (first class support for containers of proposals).Currently, the latter is only supported if the proposals are part of
MHSampler
. Moreover, I imagine this allows us to remove support forProposal
s which itself include an array of proposals in a second step.