Skip to content
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

NAN returned in large data and large iteration number #355

Open
Yuxin-Ren-SZ opened this issue Jan 26, 2024 · 1 comment
Open

NAN returned in large data and large iteration number #355

Yuxin-Ren-SZ opened this issue Jan 26, 2024 · 1 comment

Comments

@Yuxin-Ren-SZ
Copy link

Hi, I'm using LinearGaussianSSM with large time seires data: 73 emission dimension, 1000 length

I noticed that both fit_em() and posterior_predictive() will return me nan parameters or nan posterior predictions if I ran too many iterations, around 150 iterations. And if reduced the emission dimension or state dimension it can hold longer.

I felt like this is probably an overflow or underflow problem. I wonder if there is anything we can do in dynamax or jax to prevent it from returning nan.


A separate question: in dynamax.linear_gaussian_ssm.inference -> lgssm_posterior_sample() -> _step()

return state, state

And this is only used once and the first state, which should be exactly the same as second one, is discarded. I wonder if this is for later development or it's just an omit.

@Yuxin-Ren-SZ
Copy link
Author

After reading #290 which I believe is the same problem here but in HMM, I believe this is caused by same problem here. I will try to locate the origin and fix it.

In the same time, I think it is better to check other models' smoother functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant