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

Generally support container of proposals #58

Merged
merged 7 commits into from
May 28, 2021
Merged

Conversation

devmotion
Copy link
Member

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 for Proposals which itself include an array of proposals in a second step.

@cpfiffer
Copy link
Member

Looks good to me, I'll take another look after tests pass.

@devmotion
Copy link
Member Author

devmotion commented May 26, 2021

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 step for MALA again.

Comment on lines +52 to +53
proposal(-gradient_logdensity_candidate), state, candidate
) - q(proposal(-gradient_logdensity_state), candidate, state)
Copy link
Member Author

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 😴

Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Contributor

@briandepasquale briandepasquale May 27, 2021

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 :)

@cpfiffer cpfiffer mentioned this pull request May 27, 2021
@devmotion devmotion requested a review from cpfiffer May 28, 2021 10:49
@devmotion devmotion merged commit 1911b9d into master May 28, 2021
@devmotion devmotion deleted the dw/multiple_proposals branch May 28, 2021 14:46
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

Successfully merging this pull request may close these issues.

3 participants