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

Variable transformations #582

Merged
merged 12 commits into from
Feb 3, 2025
Merged

Variable transformations #582

merged 12 commits into from
Feb 3, 2025

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Jan 24, 2025

This PR adds a series of new docs on:

  • why variables might need to be transformed;
  • how this is accounted for mathematically with the Jacobian term;
  • basic API and functionality of Bijectors.jl;
  • higher-level usage of transforms in DynamicPPL and Turing.

Comments are welcome:)

PS. I know that there is some subtlety with the Turing.jl HMC sampling section because the print statements don't actually happen during the sampling, they occur when values_as_in_model is called (post-sampling) to collect the values. I figured it's ok to gloss over that, though, because it's still true that HMC sampling occurs entirely in unconstrained space.

Copy link
Contributor

Preview the changes: https://turinglang.org/docs/pr-previews/582
Please avoid using the search feature and navigation bar in PR previews!

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor stuff. I like these docs a lot!

developers/transforms/bijectors/index.qmd Outdated Show resolved Hide resolved
developers/transforms/distributions/index.qmd Outdated Show resolved Hide resolved
developers/transforms/distributions/index.qmd Show resolved Hide resolved
developers/transforms/distributions/index.qmd Outdated Show resolved Hide resolved
developers/transforms/distributions/index.qmd Outdated Show resolved Hide resolved
developers/transforms/distributions/index.qmd Outdated Show resolved Hide resolved
developers/transforms/distributions/index.qmd Outdated Show resolved Hide resolved
developers/transforms/distributions/index.qmd Outdated Show resolved Hide resolved
Copy link
Member

@mhauru mhauru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I had a few small comments, but they are minor enough that I'm happy to merge as-is if need be.

developers/transforms/bijectors/index.qmd Show resolved Hide resolved
developers/transforms/bijectors/index.qmd Outdated Show resolved Hide resolved
developers/transforms/bijectors/index.qmd Outdated Show resolved Hide resolved
developers/transforms/bijectors/index.qmd Show resolved Hide resolved
developers/transforms/dynamicppl/index.qmd Show resolved Hide resolved
@penelopeysm
Copy link
Member Author

I'll leave this up a few more days to see if anybody has more input before merging:)

@penelopeysm penelopeysm merged commit 2a44076 into master Feb 3, 2025
2 checks passed
@penelopeysm penelopeysm deleted the py/transforms branch February 3, 2025 15:21
github-actions bot added a commit that referenced this pull request Feb 3, 2025
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