Skip to content

Rerun glm-logistic #40

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

Closed
wants to merge 1 commit into from

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Feb 23, 2021

Use inferencedata / ArviZ


This one took 9668.2s on Kaggle kernels with GPU!

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@MarcoGorelli MarcoGorelli marked this pull request as draft February 23, 2021 14:05
@twiecki
Copy link
Member

twiecki commented Mar 8, 2021

@MarcoGorelli What's missing here?

@MarcoGorelli
Copy link
Contributor Author

MarcoGorelli commented Mar 8, 2021

I think there's a few errors, but I plan to address them this week

EDIT

didn't get round to it this week in the end, not sure when I'll have time, sorry

@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-03-08T15:36:40Z
----------------------------------------------------------------

I would suggest using https://arviz-devs.github.io/arviz/api/generated/arviz.sel_utils.xarray_var_iter.html#arviz.sel_utils.xarray_var_iter. We just modified the return signature so now it's not as convenient as what I did in https://oriolabril.github.io/oriol_unraveled/python/arviz/matplotlib/2020/06/20/plot-trace.html#The-lines-argument, but it is in general much better practice and will work for scalar and multidimensional variables, whereas the summary approach gets tricky with multidim variables.

I am also seeing that it is probably good idea to allow having the var, sel, values return signature for uses like this


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-03-08T15:36:41Z
----------------------------------------------------------------

The labels are wrong here, as it uses plt they are added to the rightmost axes instead of being added on the central one


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-03-08T15:36:41Z
----------------------------------------------------------------

not sure if it only happens in reviewnb, but the italics formatting is wrong


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-03-08T15:36:42Z
----------------------------------------------------------------

We would have to look at the internals of plot_glm to make sure it won't automatically convert to ndarray, but using xarray here would significantly simplify the code. All broadcasts would go, x_norm would not be needed anymore and the formula for z would use the actual variables instead of the more cryptic x_norm.

It requires initializing the ages linspace as a dataarray instead, but after that broadcasting is automatic.

We can open an issue about that to have someone else do it in a follow-up PR too.


@OriolAbril
Copy link
Member

related to #82

@MarcoGorelli
Copy link
Contributor Author

closing as stale for now as I'm never getting round to this and there are other PRs addressing glm notebooks anyway

@MarcoGorelli MarcoGorelli deleted the rerun-glm-logistic branch June 18, 2021 11:36
twiecki pushed a commit that referenced this pull request Jan 17, 2023
* refactor

* use keys

* sample k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants