-
Notifications
You must be signed in to change notification settings - Fork 1
Description
@dr-david We discussed using compartmental models a few times, I've decided to write it down here, so I don't forget the equations.
There are several compartmental models.
Two of them are described at the end of this issue.
Using Diffrax we can implement them and model how the fraction of particular variant changes over the time, i.e.,
and see how well the logistic growth approximates this dynamics over the time.
Note that we can:
- Solve the model in terms of the usual fractions of the population, and then calculate the proportions
$y_k$ just from the data. - We can even try to fit the model in the Bayesian manner, backpropagating the gradients through and ODE with Diffrax. Note that, however, this model is not identifiable.
SIR model
In this model, we have functions
SIS model
In this model, we do not have the recovered population.
Tasks
- Implement the SIR model in Diffrax.
- Implement the SIS model in Diffrax.
- In a notebook (or Snakemake), on simulated data: fit the basic logistic growth model.
- Fit the compartmental models using NumPyro.