You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code a random process generates alpha vectors for Dirichlet distributions and on rare occasions these can have extreme values. When sampling with an alpha where all values are extremely low the rand() function returns an array of NaN, sometimes with an Inf in there. Here is an example:
rand(Dirichlet([8e-5, 1e-5, 2e-5]))
At slightly less extreme values it produce NaN arrays less frequently, but still sometimes:
rand(Dirichlet([8e-4, 1e-4, 2e-4]))
It seem to only happen when all values are low.
I don't know if this is really a bug. There is no practical difference between these examples and using less extreme values that works (they are so extreme they will always produce certainty in one category). So it is easy to make a work around to makes my code run. However, I thought report it anyway as it might highlight a deeper, less noticeable problem?
I have also experienced it producing a vector where the values doesn't sum to 1. So much that the Categorical distribution throws and error saying that it is not a probability vector. But I failed to make a reproducible example (might be a bug of my own then?). Is this something there could be an explanation for?
The text was updated successfully, but these errors were encountered:
quildtide
added a commit
to quildtide/Distributions.jl
that referenced
this issue
Aug 16, 2024
In my code a random process generates alpha vectors for Dirichlet distributions and on rare occasions these can have extreme values. When sampling with an alpha where all values are extremely low the rand() function returns an array of NaN, sometimes with an Inf in there. Here is an example:
At slightly less extreme values it produce NaN arrays less frequently, but still sometimes:
It seem to only happen when all values are low.
I don't know if this is really a bug. There is no practical difference between these examples and using less extreme values that works (they are so extreme they will always produce certainty in one category). So it is easy to make a work around to makes my code run. However, I thought report it anyway as it might highlight a deeper, less noticeable problem?
I have also experienced it producing a vector where the values doesn't sum to 1. So much that the Categorical distribution throws and error saying that it is not a probability vector. But I failed to make a reproducible example (might be a bug of my own then?). Is this something there could be an explanation for?
The text was updated successfully, but these errors were encountered: