Skip to content

Commit ee1cabd

Browse files
committed
More cleanup and case comments
1 parent efa3dbd commit ee1cabd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/penn_chime/models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ def __init__(self, p: Parameters):
6262
self.recovered = p.recovered
6363

6464
if p.date_first_hospitalized is None and p.doubling_time is not None:
65+
# Back-projecting to when the first hospitalized case would have
6566
logger.info('Using doubling_time: %s', p.doubling_time)
6667
self.i_day = 0
67-
self.beta = (
68-
(intrinsic_growth_rate + gamma)
69-
/ susceptible
70-
)
68+
self.beta = get_beta(intrinsic_growth_rate, gamma, self.susceptible, 0.0)
7169

7270
self.i_day = 0 # seed to the full length
7371
self.beta_t = self.beta
@@ -86,6 +84,7 @@ def __init__(self, p: Parameters):
8684
self.i_day)
8785

8886
elif p.date_first_hospitalized is not None and p.doubling_time is None:
87+
# Fitting spread parameter to observed hospital census (dates of 1 patient and today)
8988
self.i_day = (p.current_date - p.date_first_hospitalized).days
9089
logger.info(
9190
'Using date_first_hospitalized: %s; current_date: %s; i_day: %s',

0 commit comments

Comments
 (0)