Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Sheldon committed Jan 18, 2021
1 parent 94576ca commit ce940ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions covid/models/SEIRD_incident.py
Expand Up @@ -51,8 +51,8 @@ def __call__(self,
'''

# Sample initial number of infected individuals
I0 = numpyro.sample("I0", dist.Uniform(0, 1e-3*N))
E0 = numpyro.sample("E0", dist.Uniform(0, 1e-3*N))
I0 = numpyro.sample("I0", dist.Uniform(0, 1e-4*N)) # change to 1e-3 if starting on 2020-03-16
E0 = numpyro.sample("E0", dist.Uniform(0, 1e-4*N)) # change to 1e-3 if starting on 2020-03-16
H0 = numpyro.sample("H0", dist.Uniform(0, 1e-4*N))
D0 = numpyro.sample("D0", dist.Uniform(0, 1e-4*N))

Expand Down Expand Up @@ -211,8 +211,8 @@ def dynamics(self, T, params, x0, num_frozen=0, confirmed=None, death=None, suff
x_diff = np.diff(x, axis=0)

# Don't let incident cases/deaths be exactly zero (or worse, negative!)
new_cases = np.maximum(x_diff[:,6], 0.01)
new_deaths = np.maximum(x_diff[:,5], 0.001)
new_cases = np.maximum(x_diff[:,6], 0.)
new_deaths = np.maximum(x_diff[:,5], 0.)

# Noisy observations
with numpyro.handlers.scale(scale=0.5):
Expand Down

0 comments on commit ce940ec

Please sign in to comment.