-
Notifications
You must be signed in to change notification settings - Fork 107
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
Adjusts for the fact that IRMH proposal might not be symmetric #581
Adjusts for the fact that IRMH proposal might not be symmetric #581
Conversation
Codecov Report
@@ Coverage Diff @@
## main #581 +/- ##
=======================================
Coverage 99.14% 99.14%
=======================================
Files 49 49
Lines 2117 2117
=======================================
Hits 2099 2099
Misses 18 18
|
Thanks, could you add a small test? |
""" | ||
|
||
def proposal_generator(rng_key: PRNGKey, position: ArrayTree): | ||
del position |
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.
reverse.
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.
done, just out of curiosity why is that del needed?
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.
It's not needed, mostly it is styling to signify the input arg is not needed.
Added the smallest test that only tests the behavior within this kernel, so as to avoid retesting MH acceptance rule, which is already tested in another place. |
* Adjusting for the fact that the IRMH proposal might not be symmetric * Fixing type annotation * Adding proposal_logdensity_fn to the interface exposed to users, with default parameter * Applying pre-commit to all files * Adding minimal test
Thank you for opening a PR!
Adds proposal_logdensity_fn as parameter, so as to modify MH acceptance rule to accommodate for non-symmetry of the proposal distribution.
A few important guidelines and requirements before we can merge your PR:
main
commit;pre-commit
is installed and configured on your machine, and you ran it before opening the PR;I haven't added new tests since this is just calling build_rmh from within a factory (IRMH is indeed a factory) and the functionality is already well tested.
Consider opening a Draft PR if your work is still in progress but you would like some feedback from other contributors.