-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Refactor sample_posterior_predictive_w
for V4
#5800
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
Refactor sample_posterior_predictive_w
for V4
#5800
Conversation
fast posterior_predictive_sampling no longer exists (everything is fast now). Also some tweaks will be needed following #5787 which should be merged soon! |
Codecov Report
@@ Coverage Diff @@
## main #5800 +/- ##
==========================================
+ Coverage 88.99% 89.43% +0.43%
==========================================
Files 74 74
Lines 13809 13807 -2
==========================================
+ Hits 12290 12348 +58
+ Misses 1519 1459 -60
|
Let me make those tweaks and push tonight. |
@@ -1958,13 +1958,14 @@ def sample_posterior_predictive_w( | |||
# TODO sample_posterior_predictive_w is currently only work for model with | |||
# one observed. | |||
# XXX: This needs to be refactored | |||
# ppc[var.name].append(draw_values([var], point=param, size=size[idx])[0]) | |||
raise NotImplementedError() | |||
ppcl[var.name].append(draw([var])[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't be conditioned on the posterior samples.
You will have to create a custom function similarly to what sample_posterior_predictive
does. See recent changes in #5759
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might also be useful to compare what changed between V3 and V4 in sample_posterior_predictive
because some of the things in sample_posterior_predictive_w
might no longer be needed / make sense
5bb0f63
to
f1d0f91
Compare
f1d0f91
to
6683916
Compare
sample_posterior_predictive_w
for V4sample_posterior_predictive_w
for V4
Closing in favour of #6254 |
This tries to address #4807
Right now, it passes all unit tests, but doesn't use the fast sampling procedure of
sample_posterior_predictive
The code is also not feature-complete.