Closed PhilMiller closed 4 years ago
Playing with things a bit more, the prescribed-doubling-time mode is much more sensitive to this than the prescribed-first-hospitalization mode, because their fitting procedures differ.
Very good catch, @PhilMiller. Indeed this is an issue with fitting days_since. It's finding the optimal solution on the other side of the curve, which makes perfect sense. Any way to keep it on the left side of the projection will fix this.
If we create a row tracking DI/Dt then we can limit the search space to where this is > 0. As in, the slope of the infections curve has to be positive (eg on the left side of the hump).
DI/Dt is precisely the admissions (scaled), so could just make use of that for the constraint.
@cjbayesian I just noticed in your comments as I'm revisiting this - admissions is a rate coefficient times -dS/dt
, not dI/dt
- the latter term includes recoveries. This is exactly what you fixed in #189, a week prior.
Summary
Post #255 / #273 the model gets fit to the current hospitalized census. With a long forecast, the closest fitting day may be past the peak, when we actually want to fit to the closest pre-peak day.
Additional details
Suggested fix
Look for the peak in the range of predictions, and then compute minimum loss day among days up to that day.