-
Notifications
You must be signed in to change notification settings - Fork 2
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
The log-partition function for the continuous Bernoulli is not continuous. #132
Comments
Just wonder, @ismailsenoz, shouldn't we refrain from logpartitions resulting in constants? |
@albertpod It's not possible for this distribution, because the expression is not well-defined at the value 0. But, if you will take it's limit you will obtain 0, not a log(2). |
Maybe we can to add |
What is |
I see, the problem is the limit |
Wolfram tells me that the limit is not well-defined, I would probably simply remove all if-checks and let it fail if someone uses it with p=0.5 or make it a non proper exp family member |
The limit is defined it's easy to check @bvdmitri |
Because this particular distribution is not yet added in the wikipage |
@bvdmitri @ismailsenoz The guys defining its at |
My bad
It is in the table
Solving for specific case does not seem like a right solution (also in the current code). The function should be approximated with a different function in the whole region around that value, perhaps with linear, Fourier or bspline approximations then. Doing that right is not an easy task (the reason why StatsFuns.jl exists basically) |
yes, you are right, I found it. |
The "right" way to fix numerically problematic functions usually look something like this 🥲, but I doubt we should spend a lot of time on it. Maybe there is already a package that computes it |
Agree, but it's still better then return 100% wrong value |
I asked in Julia math slack channel, maybe someone already did it |
Jürgen Fuhrmann from this thread did
|
I think there is a mistake,
and it's supposed to be
The text was updated successfully, but these errors were encountered: