-
-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a simple SEIR model #2446
Conversation
for attempt in range(100): | ||
samples = model.generate({"R0": args.basic_reproduction_number, | ||
"rho": args.response_rate}) | ||
obs = samples["obs"][:args.duration] | ||
S2I = samples["S2I"] | ||
new_I = samples.get("S2I", samples.get("E2I")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's going on here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the SIR models, S2I is noisily observed. In SEIR models, E2I is noisily observed. This one-liner works for either model class.
self.data = data | ||
|
||
series = ("S2E", "E2I", "I2R", "obs") | ||
full_mass = [("R0", "rho")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be passed through infer
like num_quant_bins
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it is already passed like num_quant_bins
.
full_mass = options.pop("full_mass", self.full_mass) |
This class attribute merely sets the default value.
Thanks for reviewing @martinjankowiak ! |
Addresses #2426
This adds a simple SEIR model with
Binomial
transitions and likelihoods. I plan to follow this up with an overdispersed SEIR model withBetaBinomial
infections, but that will require deeper modifications from theSimpleSIR
s model.@martinjankowiak you should be able to test mixing by adding the
-e
command line arg e.g.Tested