-
-
Notifications
You must be signed in to change notification settings - Fork 269
Fixup putting workflow #39
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 |
05798b5
to
ef55d27
Compare
Is it worth to resolve these conflicts? The changes here make the NB better. |
Thanks! I'll fix it up, hope to get back to this soon-ish |
I would rather have this changes than the current ones, if it's easier I think you can just ignore the current changes and use your version. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-29T01:44:26Z I would suggest using xarray for computation here, I think it will make calculations more explicit and clear:
t = xr.DataArray( np.linspace(0, golf_data.distance.max(), 200), dims=["distance"] ) logit_trace_combined = logit_trace.posterior.stack(sample=("chain", "draw")) expit = xr.apply_ufunc( scipy.special.expit, logit_trace_combined["a"] * t + logit_trace_combined["b"], )
I have not tried the code, but something like that should work, matplotlib can take dataarrays the same way it can take pandas series as if they were numpy arrays, and it accepts 2d arrays to plot multiple lines all at the same time too (maybe a transpose is needed though). Also, better names are probably needed.
And last, MarcoGorelli commented on 2021-04-07T14:25:20Z @OriolAbril I tried this, but
And last,
OriolAbril commented on 2021-04-07T15:02:55Z True, my bad completely. the OriolAbril commented on 2021-04-07T15:06:02Z Actually, side note, the |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-03-29T01:44:26Z we could add coordinates when creating |
Thanks for your suggestion! I haven't yet really made sense of xarray and its magic, so for now I've just resolved the conflicts (i.e. EDIThoping to address the xarray comments next week |
@OriolAbril I tried this, but
And last,
View entire conversation on ReviewNB |
True, my bad completely. the View entire conversation on ReviewNB |
Actually, side note, the View entire conversation on ReviewNB |
Something I don't understand about this notebook is that there's a cell which says
But then, it proceeds to do ax.plot(t, forward_angle_model(angle_trace["variance_of_shot"].mean(), t)) However, based on the above, I think I would've expected something like ax.plot(t, forward_angle_model(angle_trace["variance_of_shot"], t).mean()) |
not sure why the diff isn't being picked up nicely by review-nb, will take another look later EDITsolved, just had to remove the metadata added when running this on Kaggle. Will check over this again tomorrow |
ca13e1d
to
337c97f
Compare
View / edit / reply to this conversation on ReviewNB MarcoGorelli commented on 2021-04-23T20:12:44Z IMO the correlation plot is a bit of a distraction here, so I've removed it |
Don't worry about it, it happens quite often (at least it has happened quite often in PRs I review) reviewnb just misses the point completely from time to time and thinks the whole notebook was updated. |
I don't know what |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-04-24T17:22:05Z The first line doesn't look like it has any effect. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-04-24T17:22:06Z The uncombined trace can be used here, everything should still work the same. I also believe that the
I prefer using the uncombined trace because then below we can also use the uncombined trace and call |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-04-24T17:22:07Z I don't know if |
Thanks @OriolAbril for your really helpful reviews! |
* Add pre-commit config Closes #39 * Apply pre-commit formatting
fixing it up to use inference data and ArviZ
Addresses issue #50.