-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
BUG: The beta distribution generates random values equal to 0 #7694
Comments
We actually have a clipped_beta here, but we are not using it as the PyTensor is just defaulting to what numpy does. I guess numba does the same, and not sure about JAX. pymc/pymc/distributions/continuous.py Lines 1046 to 1052 in a9c5a85
pymc/pymc/distributions/continuous.py Line 1129 in a9c5a85
Boundary situations are always tricky with float precision. And the support is ambiguous? Wikipedia includes both: https://en.wikipedia.org/wiki/Beta_distribution Our logp also accepts 0 or 1 |
But not only the probability at x = {0, 1} is 0, but also the density (edit: it can also be undefined when alpha or beta are < 1). That's why I think they should be excluded. (btw I agree the support is ambiguous) |
Not if alpha=beta=1 ;) |
Anyway I would say if numpy is happy with it, we don't need to deviate here. Strong disagreement? |
Nope. I think it's totally fine. I can adjust the test on the Bambi side. Thanks! |
Describe the issue:
Someone reported a test failing in Bambi (see bambinos/bambi#888).
The test was checking whether random values generated from a beta likelihood were always in the (0, 1) interval.
I managed to reproduce the example in PyMC.
Reproduceable code example:
Error message:
PyMC version information:
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: