-
-
Notifications
You must be signed in to change notification settings - Fork 269
GLM poisson regression update with bambi #191
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
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 aloctavodia commented on 2021-06-29T09:43:15Z Line #6. import patsy as pt Instead of patsy you could use formuale. This is what bambi uses. from formulae import design_matrices
chiral-carbon commented on 2021-06-29T13:30:32Z oh okay sure, will use this |
View / edit / reply to this conversation on ReviewNB aloctavodia commented on 2021-06-29T09:43:16Z dm = design_matrices(fml, df, na_action="error") |
View / edit / reply to this conversation on ReviewNB aloctavodia commented on 2021-06-29T09:43:16Z dm.common.as_dataframe() |
View / edit / reply to this conversation on ReviewNB aloctavodia commented on 2021-06-29T09:43:17Z The names used by formulae are slightly different
|
View / edit / reply to this conversation on ReviewNB aloctavodia commented on 2021-06-29T09:43:17Z mu is not present
|
View / edit / reply to this conversation on ReviewNB aloctavodia commented on 2021-06-29T09:43:18Z mu is not present.
Maybe instead you can compute the posterior predictive distribution and then take the mean. Something like this.
model.posterior_predictive(inf_fish_alt) #notice tthat by default this is an inplace operation inf_fish_alt.posterior_predictive["nsneeze"].mean().item() chiral-carbon commented on 2021-06-29T13:32:31Z yes wanted some help as to how to get mu with bambi. thanks a lot! |
oh okay sure, will use this View entire conversation on ReviewNB |
yes wanted some help as to how to get mu with bambi. thanks a lot! View entire conversation on ReviewNB |
@aloctavodia hey! sorry I took so long to update this, I had been taking a break from the internship for personal reasons. hope you and @OriolAbril can review this when you get some time. |
thanks @chiral-carbon! |
Addresses issue #86 and updates GLM poisson regression to use
bambi
instead ofpymc.glm
Still pretty new to bambi so wanted to understand how to get
mu
in theposterior
group in the resulting inference data on runningbambi.Model.fit()
in cell 19.