Comment with link to
@@ -182,6 +182,8 @@ class SimSirModel:
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()
