-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unified Wald constructor #85
Comments
The benchmarks below show that the mixture model is about 6 times slower than the wald model due to sampling the drift rate, and extra terms. On a development branch I show that condionally executing the wald code when eta is zero achieves the desired speed up without time instability problems. My plan is to drop WaldMixture in favor of a general Wald model. I will not merge this until later. I would prefer to make some breaking changes in bulk. In the meantime, you can just use WaldMixture with the parametric constraint that eta = 0 to achieve the special case.
|
Two more semi-related things:
|
That is a good idea. I'll make that change.
I think this behavior is to be expected. X ~ normal(3, 0) + exponential(.10) simplifies to a shifted exponential where the var(X) = .10:
|
Indeed that makes sense, that it would still have variability from the exp distrib |
I'll have to think about circumventing the error when tau = 0. Upon further thought, I think it might not be a good idea because the expontial distribution is not defined when tau = 0, which, I think, would imply the exguassian is not defined. Along the same lines, the logpdf is not defined with tau = 0 because it is used as a divisor. Right now I think the current implementation is correct. |
Although one could argue that if the exponential is "null" then only the Normal remains for Normal + Exp. |
I verified with gamlss in R:
|
For ExGaussian, the problem with it throwing a DomainError with Would it make sense to return -Inf for the logpdf when |
@DominiqueMakowski, please add the proposed fix via |
I've ran a couple of times and it seems like it fixed the issue! |
Awesome. I will merge the fix and release a new version shortly. Hopefully, it continues to work well with Pigeons. |
On a side note:
Despite having a link function on alpha that should prevent it from being 0. I'm not sure what the cause is, though. Also, would it make sense (in terms of efficiency) to use the LocationScale(τ, 1, InverseGaussian(μ,λ)) |
Numerical errors can be frustrating. It sounds like there are two potential points of error: (1) your link function, and (2) the reparameterization from Wald parameters to InverseGaussian parameters. One thing you could do is set up print statements to see where the problem is occurring and you could consider adding a check like |
New issue to track and discuss the streamlining of the Wald API (merging of Wald and Mixture Wald) (#83 (comment))
The text was updated successfully, but these errors were encountered: