-
-
Notifications
You must be signed in to change notification settings - Fork 988
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
Add overdispersed models to contrib.epidemiology #2498
Conversation
0c214d7
to
8ec2e2e
Compare
if _is_zero(overdispersion): | ||
return dist.ExtendedBinomial(total_count, probs) | ||
if getattr(probs, "dtype", torch.float64) != torch.float64: | ||
warnings.warn("binomial_dist is unstable for dtypes less than torch.float64; " |
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.
is this really the source?
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.
Good point. I've moved the warning to CompartmentalModel.fit()
and .predict()
.
@martinjankowiak thanks for your patience. I've isolated the changes to two new models. I plan to test these on real data in the next couple weeks. |
Addresses #2426
This aims to improve fit to real data and improve mixing by relaxing all
Binomial
distributions to precisely overdispersedBetaBinomial
s such that the large population limiting dynamics is an SDE rather than a deterministic ODE. These new distributions are used in two new models:OverdispersedSIRModel
andOverdispersedSEIRModel
.Questions
overdispersion
parameter reasonable?Beta(2, 2)
Tested
BetaBinomial
s results in ~20% slowdown of likelihood computation