Skip to content

Commit 3d3c21c

Browse files
committed
Extend prefit days
1 parent d756c6e commit 3d3c21c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/penn_chime/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717

1818
FLOAT_INPUT_MIN = 0.0001
1919
FLOAT_INPUT_STEP = 0.1
20+
21+
PREFIT_ADDITIONAL_DAYS = 300

src/penn_chime/model/sir.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import numpy as np
1515
import pandas as pd
1616

17+
from ..constants import PREFIT_ADDITIONAL_DAYS
1718
from .parameters import Parameters
1819

1920

@@ -68,7 +69,8 @@ def __init__(self, p: Parameters):
6869

6970
if p.mitigation_date is None:
7071
self.i_day = 0 # seed to the full length
71-
raw = self.run_projection(p, [(self.beta, p.n_days)])
72+
raw = self.run_projection(p, [
73+
(self.beta, p.n_days + PREFIT_ADDITIONAL_DAYS)])
7274
self.i_day = i_day = int(get_argmin_ds(raw["census_hospitalized"], p.current_hospitalized))
7375

7476
self.raw = self.run_projection(p, self.gen_policy(p))

0 commit comments

Comments
 (0)