-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Replacing PyMC3 plots w/ Arviz plots & sigma Param change [Part 6] #20
Replacing PyMC3 plots w/ Arviz plots & sigma Param change [Part 6] #20
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-03-08T11:03:10Z Need to set up a single OriolAbril commented on 2021-03-08T16:11:33Z if you start with the hdi plot, ArviZ will generate the axes and return it. CloudChaoszero commented on 2021-03-14T04:28:26Z Sounds great, done! Thanks for the tips |
@@ -20,6 +20,10 @@ | |||
"outputs": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CloudChaoszero Sorry this took so long to get to. Are you still up for pushing this over the finish line? I think the last outstanding issues are pretty small and we should be able to resolve them quickly. |
if you start with the hdi plot, ArviZ will generate the axes and return it. Not sure if this is a practice to be recommended, but maybe? View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-08T16:28:58Z I would remove the CloudChaoszero commented on 2021-03-14T04:28:35Z Sounds good! |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-08T16:28:59Z I would use CloudChaoszero commented on 2021-03-14T04:29:04Z I re-ran the visualizations, and they did not have an outputted warning cell (except for subsequent visualizations). Thanks! |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-08T16:29:00Z I would remove the 2000 here too, and let the default of as many samples as the posterior be used. |
@@ -20,6 +20,10 @@ | |||
"outputs": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return_inferencedata
should be manually set, either to True or to False, but one of the two to avoid the warning.
If False, an inferencedata should be created within the model context, and passed to arviz. This will 1) avoid the warning of conversion without the model context and 2) push forward arviz best practices, it is probably not too relevant here but conversion may not be cheap for some models because it requires computing all the poitnwise log likelihood values. az.plot_xyz(trace)
works because ArviZ internally converts the data to inferencedata, then plots.
Reply via ReviewNB
@@ -20,6 +20,10 @@ | |||
"outputs": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use az.plot_pair
here, it can also use hexbin mode, some examples: https://arviz-devs.github.io/arviz/examples/plot_pair_hex.html and https://arviz-devs.github.io/arviz/examples/plot_joint.html. Side advantages, I think with that we can use return_inferencedata=True
directly and the plot will be automatically labeled
Reply via ReviewNB
@@ -245,7 +245,7 @@ | |||
" }\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we are not storing the summary dataframe anywhere and we only want the rhat, we should use rhat instead. The assertion can be done with:
assert (az.rhat(trace).to_array() < 1.1).all()
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure. Just re-ran the pre-existing notebooks. haha
Sounds great, done! Thanks for the tips View entire conversation on ReviewNB |
Sounds good! View entire conversation on ReviewNB |
I re-ran the visualizations, and they did not have an outputted warning cell (except for subsequent visualizations). Thanks! View entire conversation on ReviewNB |
Pardon for the delay @twiecki. I made the respective updates. Thanks for the feedback @OriolAbril ! It really helped out on a couple of outputs. I did not act on a couple of other ones because they would probably be for future development (e.g. returninference or some additional viz customizations). Also, I disabled the specified button for this PR, seen below |
Thanks @CloudChaoszero! |
@CloudChaoszero can you please create issues about all the comments you have not addressed so other people can easily know low hanging fruit tasks on which to work regarding notebooks? |
Sounds good! |
Description
The following is a large PR breakdown of PR #16.
Replace PyMC3 dependent plots with arviz plots in case studies & examples.
Replace parameter
sd
withsigma
(e.g. some examples havepm.Normal(...sd=...)