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

Implement logabsdetjac for Inverse{<:TruncatedBijector} for better numerical stability #325

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

acertain
Copy link

Example of previous badness: logabsdetjac(inverse(bijector(Uniform(-1,1))), 80) = -Inf (is now -79.30685281944005)

Formula stolen from stan, I didn't check its correctness.

src/bijectors/truncated.jl Outdated Show resolved Hide resolved
src/bijectors/truncated.jl Outdated Show resolved Hide resolved
src/bijectors/truncated.jl Outdated Show resolved Hide resolved
src/bijectors/truncated.jl Outdated Show resolved Hide resolved
src/bijectors/truncated.jl Outdated Show resolved Hide resolved
src/bijectors/truncated.jl Outdated Show resolved Hide resolved
src/bijectors/truncated.jl Outdated Show resolved Hide resolved
…merical stability

Example of previous badness:  logabsdetjac(inverse(bijector(Uniform(-1,1))), 80) = -Inf (is now -79.30685281944005)
@acertain
Copy link
Author

@devmotion thanks for the suggestions, I've implemented them

@yebai
Copy link
Member

yebai commented Aug 29, 2024

@acertain this seems to break a correctness test for Julia 1.6. Do you want to take a look?

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