-
-
Notifications
You must be signed in to change notification settings - Fork 267
update Binomial regression notebook to v4 #273
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 Binomial regression notebook to v4 #273
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 OriolAbril commented on 2022-01-30T23:54:30Z
drbenvincent commented on 2022-02-01T16:42:16Z Fixed in an imminent commit |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-01-30T23:54:30Z Line #13. post_mean = idata.posterior.stack(sample=("chain", "draw")).p.mean("sample") xarray supports averaging along multiple dimensions at the same time. As we are not really using the sample dimension, we can skip the stacking:
post_mean = idata.posterior.p.mean(("chain", "draw")) drbenvincent commented on 2022-02-01T16:42:49Z Thanks, this is handy to know! Still learning about the wonders of Xarray. Have replaced this in an imminent commit |
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.
commented two nits, the main issue are the git conflicts with the references file
examples/references.bib
Outdated
title={Beyond multiple linear regression: Applied generalized linear models and multilevel models in R}, | ||
author={Roback, P., and Legler, J.}, | ||
year={2021}, | ||
publisher={CRC Press} |
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.
you can also add a url
field to include https://bookdown.org/roback/bookdown-BeyondMLR/ in the bibliography citation too.
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.
Done :)
Fixed in an imminent commit View entire conversation on ReviewNB |
Thanks, this is handy to know! Still learning about the wonders of Xarray. Have replaced this in an imminent commit View entire conversation on ReviewNB |
Made those changes 👍 I'm not sure why I'm getting conflicts with the |
c8e21f0
to
72b468c
Compare
The bibliography is not working, it looks like the whole directive is in a single line, it must be in 3 lines minimum like in the example at https://docs.pymc.io/en/latest/contributing/jupyter_style.html#references |
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.
Two tiny comments: (i) the Jupyter style guide suggests to not use unicode in code blocks; (ii) Successes is sometimes mis-spelled
Thanks @ltoniazzi. I'm not a fan of the no unicode thing, but I've done that. I've also added |
Try running |
All checks have passed 🥳 |
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.
Looks good to me!
Also TIL that arviz.plot_hdi
is an alternative/addition to pm.gp.util.plot_gp_dist
.
On that side note: @OriolAbril what do you think about migrating pm.gp.util.plot_gp_dist
to arviz and extending it with a kwarg to draw HDI limits kind of like this?
Shall I open an Issue/Discussion over at ArviZ ?
I hardly ever use gps and don't know what |
not at all. It's pretty generic and you can use if for any kinds of bands. I'll open a ticket. |
#214
These changes should hopefully bring this notebook up to v4 spec. Just let me know if there's anything amiss.