From 3c65eef4397d12a5a2df870256eac99d85c35f4d Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Mon, 30 Mar 2020 16:24:36 -0400 Subject: [PATCH] Comment with link to #381 --- src/penn_chime/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/penn_chime/models.py b/src/penn_chime/models.py index 5c09f168..457f4df2 100644 --- a/src/penn_chime/models.py +++ b/src/penn_chime/models.py @@ -182,6 +182,8 @@ def get_loss(self) -> float: def get_argmin_ds(census_df: pd.DataFrame, current_hospitalized: float) -> float: + # By design, this forbids choosing a day after the peak + # If that's a problem, see #381 peak_day = census_df.hospitalized.argmax() losses_df = (census_df.hospitalized[:peak_day] - current_hospitalized) ** 2.0 return losses_df.argmin()