-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Divergences in examples/generalized_linear_models/GLM-ordinal-regression.ipynb #649
Comments
@NathanielF would you like to have a look at this? Or do you want me to see if I can fix it? |
Feel free to have a look @erik-werner ! Thanks for bringing it up |
Just a note here @erik-werner Had a quick look. I think the code you want to run is :
Models 1 and 2 are kind of underspecified so you will get divergences. The interesting contrasts are between the models 3 and 4 where we use the constrained uniform on the cutpoints. If you fix the fifth model to use the default sampler rather than numpyro you should be able to run the probit fit. This is also arguably an interesting contrast just to see how the parameter values shift... |
@NathanielF These were basically my conclusions as well 🙂 I wonder why the numpyro sampler cannot handle the probit model. Anyway, since you have a better overview of the whole flow, and seem to have an idea about what to write, it would be great if you'd like to update the notebook. |
Sure thing @erik-werner. Will do. On numpyro i think it has to do with the lack of parity between the jax implementation of ercf function in scipy. Thanks again for bringing the issue to my attention. |
Regression Models with Ordered Categorical Outcomes:
https://www.pymc.io/projects/examples/en/latest/generalized_linear_models/GLM-ordinal-regression.html:
Issue description
After
make_model()
is defined, five different models are created and sampled from. Unfortunately, models 1-2 have hundreds of divergences. Models 3-4 sample fine. Model 5 is identical to model 4, presumably the argumentlogit=False
is missing. If I add this argument, 2 of 4 chains are completely stuck when sampling.These divergences were not automatically reported because the numpyro sampler was used. However, since the most recent release we get warnings for divergences also for this sampler. 👍
Proposed solution
Fix the models so that they can be sampled from. Or if that turns out to be difficult, consider whether they can be removed. Or add a discussion of the problem with these models.
The text was updated successfully, but these errors were encountered: