pymc
pymc copied to clipboard
Explain the behavior of `var_names` in `sample_posterior_predictive`
This is still a draft. I want to add two more examples first about the default ppc and predictions use-cases
TODO
- [ ] Add example about common use for in-sample posterior_predictive
- [ ] Add example about common use for predictions
- [ ] Change conclusion about non-dependence on deterministics or fix behavior
- [ ] Explain volatility when MutableData changes
Link to function docs preview: https://pymcio--7014.org.readthedocs.build/projects/docs/en/7014/api/generated/pymc.sample_posterior_predictive.html
:books: Documentation preview :books:: https://pymc--7014.org.readthedocs.build/en/7014/
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.24%. Comparing base (
6c6fd13) to head (08fca4e). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7014 +/- ##
=======================================
Coverage 92.24% 92.24%
=======================================
Files 100 100
Lines 16887 16887
=======================================
Hits 15577 15577
Misses 1310 1310
| Files | Coverage Δ | |
|---|---|---|
| pymc/sampling/forward.py | 95.90% <ø> (ø) |
Last suggestion, getting into the weeds of personal preferences -- I think the API docs would look nicer if you added a title (in bold or italics or w/e) to each of the two examples.
I also think the code in the new section would be easier to follow if you split the model definition plus each function call into a separate code block and wrote your commentary as text instead of code comments.
Last suggestion, getting into the weeds of personal preferences -- I think the API docs would look nicer if you added a title (in bold or italics or w/e) to each of the two examples.
I also think the code in the new section would be easier to follow if you split the model definition plus each function call into a separate code block and wrote your commentary as text instead of code comments.
I agree, even better would be a markdown header, but I don't know if that's supported :D
I think you can use restructuredtext subsubsection headings, like:
Example 1: Exploring the effect of var_names on outputs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
See here. It's pretty hideous for viewing in an IDE, though.
That worked @jessegrabowski
Thanks @ricardoV94 , these clarifications are very much welcome!
I want to add two more examples first about the default ppc and predictions use-cases
Seems like default ppc is done and you only need predictions use-case?
I have addressed several review comments:
- Do not call new draws posterior predictive draws, but add a note for the first case where it is equivalent
- Fix the Deterministics example
I also expanded with two new example sections:
- Posterior predictive checks and predictions: Shows the common use case
- Using new models: Shows how you can use a new model with new variables
It's ready for review again. It is also likely I messed up the myst formatting so any help appreciated.
@AlexAndorra thanks for the review and suggestions. I've addressed them
Things seem to be working. @AlexAndorra wanna do one last pass?