-
-
Notifications
You must be signed in to change notification settings - Fork 269
Update GLM hierarchical binomial model to best practices #45
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
Update GLM hierarchical binomial model to best practices #45
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Performing required updates to 1-2 files now.
|
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-21T09:06:03Z We can use coords here. For example, CloudChaoszero commented on 2021-03-21T21:58:25Z Sounds good. I've updated the notebook to (hopefully) capture the changes needed! OriolAbril commented on 2021-03-29T11:45:29Z I think CloudChaoszero commented on 2021-03-31T02:36:07Z Sounds good. I added it via pm.Data under var name |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-21T09:06:07Z Use |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-21T09:06:07Z I'd use |
Also, minor note, I think you'll run into merge issues with #24 here. |
Sounds good. I've updated the notebook to (hopefully) capture the changes needed! View entire conversation on ReviewNB |
There are merge conflicts now 😅 |
@OriolAbril Yikes ha-- updated now! |
I think View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-29T11:48:40Z I think here it's better to use |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-29T11:48:41Z I would delete the commented code. Also, there is no need to use |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-29T11:54:52Z We probably should update the priors and change the CloudChaoszero commented on 2021-03-31T02:36:27Z Updated the prior to have dist. HalfNormal, from HalfFlat OriolAbril commented on 2021-03-31T04:56:32Z It looks like the prior is too restrictive now. We should try with sigma higher than one, [5, 15] maybe. I also think that we can get rid of the testvals now that we are not using an improper prior anymore. CloudChaoszero commented on 2021-04-01T08:02:18Z I removed the
Hmm, however the subsequent plot_trace & plot_pair visualizations do not re-produce the pre-existing visualizations, if you were looking to get those results. OriolAbril commented on 2021-04-01T08:07:32Z I think that not reproducing the prevoius results is an issue with our current prior choice. by default
You should see that while you increase the posterior changes dramatically (i.e. rom the current 1 to 5 for example) until a point where increasing sigma has no effect anymore (i.e. probably from 20 to 50 the posterior has no significant changes)
CloudChaoszero commented on 2021-04-03T17:42:43Z Sounds great. I changed the sigma to be from 1 to 10 actually. In the Github PR, I'll show the posterior plots b/t sigma 5 & 10. |
Sounds good. I added it via pm.Data under var name View entire conversation on ReviewNB |
Updated the prior to have dist. HalfNormal, from HalfFlat View entire conversation on ReviewNB |
It looks like the prior is too restrictive now. We should try with sigma higher than one, [5, 15] maybe. I also think that we can get rid of the testvals now that we are not using an improper prior anymore. View entire conversation on ReviewNB |
I removed the
Hmm, however the subsequent plot_trace & plot_pair visualizations do not re-produce the pre-existing visualizations, if you were looking to get those results. View entire conversation on ReviewNB |
I think that not reproducing the prevoius results is an issue with our current prior choice. by default
You should see that while you increase the posterior changes dramatically (i.e. rom the current 1 to 5 for example) until a point where increasing sigma has no effect anymore (i.e. probably from 20 to 50 the posterior has no significant changes)
View entire conversation on ReviewNB |
Sounds great. I changed the sigma to be from 1 to 10 actually. In the Github PR, I'll show the posterior plots b/t sigma 5 & 10. View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-04-04T07:05:21Z I would delete the commented code. CloudChaoszero commented on 2021-04-04T09:02:23Z Gotcha |
Thanks for the plots with multiple sigmas, it looks like from 5 to 10 it still changes significantly, can you take a look at sigma=20 and sigma=30? no need to post them, only check the intuition that the posterior progressively stops being so influenced by the prior. We are already retrieving the expected values with 10 so everything looks good. Thanks again for the PR 😄 |
Gotcha View entire conversation on ReviewNB |
@OriolAbril Yeah, so there isn't a significant change in the posteriors after updating to sigma =20, sigma=30, seen below. And no problem! 😄 This PR gives me some guidance on fully implementing Sigma = 20Sigma = 30 |
This PR is the start of #14
Addresses #61 and updates the notebook to "Best Practices"
Summary
return_inferencedata=True
.coords
exists, then add paramcoords
I'm open to interpretation on if this is what should be the goal for linked issue #14.