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

Default bijector implementation for TransformedDistribution #187

Merged
merged 6 commits into from
Jun 14, 2021

Conversation

torfjelde
Copy link
Member

@torfjelde torfjelde commented Jun 13, 2021

Currently we're missing an implementation for bijector(td::TransformedDistribution) which in turn means that you can't, without a bit of work, use transformed distributions in, say, a DPPL-model.

This is stupid because it's trivial to construct this bijector: just invert td.transform, bringing us back the original domain of td.dist, and then compose this with the bijector for td.dist, which then takes us to real space.

EDIT: Btw, I have the right to call it stupid because I'm the one who didn't do it.

@torfjelde torfjelde requested a review from devmotion June 13, 2021 19:47
@devmotion
Copy link
Member

Maybe add a test?

@torfjelde
Copy link
Member Author

Yeaaah I was thinking about it, but then when I was about too I went "wait, but I want the test to the implementation..." 😅 So I don't think there's much point tbh.

@devmotion
Copy link
Member

Yeah, I guess the main point would be to ensure that it exists and it returns correct values for a random input for transformed distributions with specific transforms (e.g. identity and exponentiation).

@torfjelde
Copy link
Member Author

Added a couple 👍

@torfjelde torfjelde merged commit 4fcda27 into master Jun 14, 2021
@delete-merged-branch delete-merged-branch bot deleted the tor/transformed-for-transformed branch June 14, 2021 08:17
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