Skip to content
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

Binning example notebook #229

Merged
merged 9 commits into from
Nov 27, 2021
Merged

Conversation

drbenvincent
Copy link
Contributor

@drbenvincent drbenvincent commented Sep 25, 2021

This pull request is for a novel example notebook. It covers how to make inferences about the parameters of a parametric distribution from observations of that distributions which have been binned. The notebook covers a range of situations, including making inferences about population parameters based upon two studies with binned data, but that have been binned differently. A collaborative effort from @ericmjl and myself.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@review-notebook-app
Copy link

review-notebook-app bot commented Oct 13, 2021

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-10-13T04:36:22Z
----------------------------------------------------------------

I think xarray can generate the scatterplot directly provided the posterior predictive samples are in the inferencedata, a bit like the scatter in https://pymc-examples.readthedocs.io/en/latest/case_studies/multilevel_modeling.html?highlight=multilevel#conventional-approaches.


drbenvincent commented on 2021-10-23T17:53:25Z
----------------------------------------------------------------

Thanks. This saves a good few lines of code. Have implemented this now.

@review-notebook-app
Copy link

review-notebook-app bot commented Oct 13, 2021

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-10-13T04:36:22Z
----------------------------------------------------------------

if using the pp from the inferencedata, this can be mean over named dims


drbenvincent commented on 2021-10-23T18:06:06Z
----------------------------------------------------------------

This is done now

@review-notebook-app
Copy link

review-notebook-app bot commented Oct 13, 2021

View / edit / reply to this conversation on ReviewNB

OriolAbril commented on 2021-10-13T04:36:24Z
----------------------------------------------------------------

links to other notebooks should use sphinx cross-references. This one I think should be:

{doc}`diagnostics_and_criticism/Diagnosing_biased_Inference_with_Divergences`

ref: https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html#the-doc-role


drbenvincent commented on 2021-10-23T16:33:08Z
----------------------------------------------------------------

This should now be done

@OriolAbril
Copy link
Member

Great notebook! Thanks! I added a couple comments plus the usual follow the style guide, specially add the post directive: https://github.com/pymc-devs/pymc/wiki/PyMC-Jupyter-Notebook-Style-Guide.

I also have a bit of a general comment. The style and writing of the notebook is very beginner friendly, trying to not assume much, which is probably best to appeal to non pymc/non bayes people and potentially drive clients to pymc labs, but I find the notebook a bit too long to be beginner friendly. I am not sure people will go over 6 full developed examples unless they are already very invested in pymc. None of the things are bad per se, I just wanted to mention it as you'll also now have to choose which category to use for the notebook and I wasn't completely sure how to review some points myself without knowing that

Copy link
Contributor Author

This should now be done


View entire conversation on ReviewNB

Copy link
Contributor Author

Thanks. This saves a good few lines of code. Have implemented this now.


View entire conversation on ReviewNB

Copy link
Contributor Author

This is done now


View entire conversation on ReviewNB

@drbenvincent
Copy link
Contributor Author

Thanks for the feedback @OriolAbril. As far as I can tell this should be all of your comments addressed now. Let me know if there's anything else :)

@drbenvincent
Copy link
Contributor Author

Anything else needed on this one before we can merge?

@OriolAbril
Copy link
Member

OriolAbril commented Nov 24, 2021

can you update it to follow the latest additions tot the style guide? https://pymc--5224.org.readthedocs.build/en/5224/contributing/jupyter_style.html (it is already available in latest too, but there is has some rendering issues)

I think the relevant sections are first cell and authorship ones. I would also recommend using more "conceptual" tags in addition to case study. Maybe "binned data", something about trying to make inference on populations? It might also be interesting for readers to have a pymc labs tag so notebooks about the work there are easy to find, and being an institutional partner I think it's perfectly fine.

Also sorry we move the finish line and sorry I missed your latest round of updates. I'll add discussing reviews here at pymc-examples to tomorrow's doc meeting, as it looks like me missing it meant a month of no reviews. Am I the only reviewer?

@OriolAbril OriolAbril merged commit fc0404f into pymc-devs:main Nov 27, 2021
@OriolAbril
Copy link
Member

Notebook is up at https://docs.pymc.io/projects/examples/en/latest/case_studies/binning.html

@drbenvincent drbenvincent deleted the gates-binning branch November 30, 2021 19:37
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.

2 participants