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

sampling from beta distribution leads to +Inf logpdf #350

Closed
belledon opened this issue Jan 30, 2021 · 2 comments
Closed

sampling from beta distribution leads to +Inf logpdf #350

belledon opened this issue Jan 30, 2021 · 2 comments

Comments

@belledon
Copy link

Currently, it is possible that Gen.random(beta, 0.01, 0.01) samples 0,1 leading to a Inf in the logpdf which in turn leads to nans in associated log scores.

this is due to a problem illustrated over in Distributions.jl JuliaStats/Distributions.jl#1003

not sure if there is much to do, but the source was difficult for me to locate and perhaps it will save someone time.

Given that Inf loglikelihoods should be impossible (not 100% sure), perhaps there can be a check for this a runtime when the logscore is being computed? happy to chip in where possible

@jamesonquinn
Copy link
Contributor

#359

marcoct added a commit that referenced this issue Feb 15, 2021
Avoid Inf from logpdf(::Beta,...) (issue #350)
@marcoct marcoct closed this as completed Feb 15, 2021
@belledon
Copy link
Author

sorry just saw this, many thanks!

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

No branches or pull requests

3 participants