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

add preconditioning matrix to barker proposal #730

Closed

Conversation

ismael-mendoza
Copy link
Contributor

@ismael-mendoza ismael-mendoza commented Aug 29, 2024

Overview

This PR attempts to add a preconditioning matrix to the barker proposal implementation, as in appendix G of https://arxiv.org/abs/1908.11812

Discussion / Questions

  • Not sure if this is the best way to take the sqrt of the inverse mass matrix? I redo the computation of the inverse twice (tried to follow HMC but didn't seem appropriate to create a metric)
  • Do I need to update the PDF? (not used anywhere in the codebase)
  • I added step_size and the inverse_mass_matrix to the BarkerState (didnt' have any of these before), OK?
  • It's not very clear in the Barker paper but the step_size (sigma) is a 'global scale' and the inverse mass matrix is separate. Are these redundant? See implementation from authors here (in R) - https://github.com/gzanella/barker/blob/master/functions.R

Thank you for opening a PR!

A few important guidelines and requirements before we can merge your PR:

  • If I add a new sampler, there is an issue discussing it already;
  • We should be able to understand what the PR does from its title only;
  • There is a high-level description of the changes;
  • There are links to all the relevant issues, discussions and PRs;
  • The branch is rebased on the latest main commit;
  • Commit messages follow these guidelines;
  • The code respects the current naming conventions;
  • Docstrings follow the numpy style guide
  • pre-commit is installed and configured on your machine, and you ran it before opening the PR;
  • There are tests covering the changes;
  • The doc is up-to-date;
  • If I add a new sampler* I added/updated related examples

Consider opening a Draft PR if your work is still in progress but you would like some feedback from other contributors.

@ismael-mendoza ismael-mendoza changed the title barker proposal with preconditioning matrix add preconditioning matrix to barker proposal Aug 29, 2024
@ismael-mendoza
Copy link
Contributor Author

ismael-mendoza commented Sep 1, 2024

Closing because I jsut read the guidelines and noticed the commit and pre-commit requirements (will create a new PR)

@AdrienCorenflos
Copy link
Contributor

Nw -> the commit pre-commit stuff is only last stage. In the meantime you can just try to get the logic right and then ask for a review when you think you have the Lego pieces fitting together.

@AdrienCorenflos
Copy link
Contributor

Feel free to open a new pr or reopen this one, at the end of the day it doesn't matter much.

@ismael-mendoza
Copy link
Contributor Author

Thanks @AdrienCorenflos that makes sense, I'll open a new one but remember that for next time. For reference opened #731

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.

2 participants