-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implements SampledValue #262
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #262 +/- ##
==========================================
- Coverage 92.80% 92.80% -0.01%
==========================================
Files 39 39
Lines 904 917 +13
==========================================
+ Hits 839 851 +12
- Misses 65 66 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…epi-inference into implements-timearray
Just found a bug in the code. Particularly the definition of the day of the week effect in the In other words, instead of returning a tuple/namedtuple, it returns a jax array, which then, when used within The example should instead return a tuple: return (jnp.tile(ans, self.nweeks)[: self.len],) But then, the code fails because the day-of-the-week RV samples a vector of length For this PR, I'll fix the example by returning a tuple with a This could have been identified if we checked that all calls to attn @damonbayer @dylanhmorris |
@gvegayon did you consider implementing this with |
I have not. I was checking, and there's not enough documentation to make good use of it. Looking at the source code of |
Co-authored-by: Damon Bayer <[email protected]>
…f a corresponding SampledValue
Ready for re-review, @damonbayer |
Co-authored-by: Damon Bayer <[email protected]>
SampledValye
class withvalue
,t_start
, andt_unit
attributes (time-related attributes are optional).RandomVariable.sample()
calls to return tuples/namedtuples withSampledValue
instead ofArrayLike
objects.The latter is the new version of the last plot, the previous figure looks like the following:
- It fixes a hidden bug in the hospital admissions model tutorial where the day-of-the-week effect was not properly used.For later
Also, in the extending pyrenew tutorial
New version of the hospital admissions plot. vs:
This is not implemented as the section on using the day-of-week effect was removed from the tutorial.