-
Notifications
You must be signed in to change notification settings - Fork 151
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
Allow the user to prescribe mitigation date #418
Conversation
… won't change when the model does
Documentation and input description wording probably need work. As implemented, without #340 taken into account, the date given needs to be when effects of distancing or other mitigation were/will be seen, not the date a policy was enacted. |
Heh, I was actually thinking about how we ought to make n_days go away as
well.
I agree on the passing a list of pairs, and of not making that class state.
I was trying to get the feature built with minimal other disruption, but if
you want the further refactoring, I'm onboard to do it.
…On Wed, Apr 1, 2020, 22:22 Jason ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/penn_chime/models.py
<#418 (comment)>:
> @@ -147,17 +147,29 @@ def __init__(self, p: Parameters):
self.daily_growth_rate_t = get_growth_rate(self.doubling_time_t)
def run_projection(self, p):
I might pass the (beta, n_day) pairs into run_projection(p, *args),
instead of using state. The call site knows better if it is pre or post
fit, and how many of these pairs are needed.
If I was going to use state, then I would store the pairs as in a list:
self.policies = [beta1, n_days1, beta2, n_days2, beta3, n_days3, beta4, n_days4...]
...
self.raw_df = sim_sir_df(
self.susceptible,
self.infected,
p.recovered,
self.gamma,
-self.i_day,
*self.policies)
... to avoid having to rewire run_projection when extending the ui to
allow multiple (social_distancing, date) pairs.
Ideally, the n_days input from the UI input would be merely a UI setting
for the graphs, and gen_sir would simply run until i < 0.5. This would
avoid complicating the model total days computations
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#418 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA64ABEP5E634KY7SAKNSTRKPZHHANCNFSM4LZQ3SNA>
.
|
…puts are compatible
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 @PhilMiller !
Is the new |
This is on top of various cleanup and refactoring in #415, so probably review that first.
There's a potential edge case if distancing is strong enough to cause a dip in the census curve, that prescribed-doubling fitting of first-hospitalization might align to a point on either side of the dip.
I've tested this manually and it seems to behave as expected, but I don't have a great handle on how to really validate it.
Fixes #407