-
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
Day of the week tutorial #344
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #344 +/- ##
==========================================
- Coverage 93.09% 93.06% -0.03%
==========================================
Files 37 37
Lines 941 952 +11
==========================================
+ Hits 876 886 +10
- 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. |
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.
Thanks @gvegayon! Some required changes and some things open for discussion.
…isignal-epi-inference into 304-day-of-the-week-tutorial
…isignal-epi-inference into 304-day-of-the-week-tutorial
Ready for review, @damonbayer and @dylanhmorris. |
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.
Just addressed conflicts. Once tests pass, I'll merge. |
Implementation
RandomVariable
that returns a vector of length 7.RandomVariable
latent.HospitalAdmissions
takes care of broadcasting the seven values to match the length of the data (latent infections, in this case).latent.HospitalAdmissions.sample()
is called; instead of passing alatent_infections
array, it passes the correspondingSampledValue
containing the latent infections.SampledValues
hast_start
, we can correct for the offset of the infections wrt the observed data.latent.HospitalAdmissions
receives a new argument indicating what's the first day of the week in the observed data. With the previous point,latent.HospitalAdmissions.sample()
properly broadcasts the DOW effect.The tutorial itself recycles the model built during the "Implementing a Hospital Admissions-only Model".
Draft Notes (not implemented, but here for future reference)
Current state:
latent.HospitalAdmissions
.To implement:
t_start
resulting from the seeding process.t_start=self.t_start
, bothNone
(see here).t_start=-I0.size
.latent.HospitalAdmissions
, we should pass theSampledValue
object with thet_start=-I0.size
.n_timepoints
to the DOW RV, we could pass theSampledValue
latent infections.t_start
and the number of time points to sample and adjust accordingly.