-
Notifications
You must be signed in to change notification settings - Fork 197
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
Numerical instabilities in Laplace EM for Poisson emissions with large spike counts #129
Comments
I tried a more numerically stable version of def inv_softplus(y):
return y + np.log(-np.expm1(-y)) to replace what's in |
@KeAWang and @kochalka, as a workaround, it looks like it should work if you use
You might still have to add a little bias to the output of the softplus in order to ensure the rates aren't numerically zero. Otherwise you'll get nan's in the likelihoods. |
@KeAWang and @kochalka and I are trying to debug a bunch of NaNs in the Newton update for the continuous states in Laplace EM. I'll follow up with more details, but it looks like the issues arise in cases where we have large spike counts and Poisson or OrthogonalPoisson emissions. I found a few places where it looked like we could get divide by zero errors in the likelihood and Hessian calculations, but haven't tracked it down yet.
The text was updated successfully, but these errors were encountered: