Skip to content
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

Exponential growth model for initial infections #116

Open
4 tasks
gvegayon opened this issue May 10, 2024 · 6 comments · May be fixed by #124
Open
4 tasks

Exponential growth model for initial infections #116

gvegayon opened this issue May 10, 2024 · 6 comments · May be fixed by #124

Comments

@gvegayon
Copy link
Member

Goal

Implement the initialization of the infections using an exponential growth model as in the wastewater model (see here):

This process is initialized by estimating an initial exponential growth[^EpiNow2] of infections for 50 days prior to the calibration start time $t_0$:

$$ I(t) = I_0\exp(rt) $$

where $I_0$ is the initial per capita infection incident infections and $r$ is the exponential growth rate.

Context

During discussions of feature prioritization. This particular component was not listed.

Required features

The feature should be implemented as a RandomVariable object part of the latent submodule.

Specifications

  • Mathematical description of the component.
  • Unit test evaluating the feature.
  • Integration test with the basic model and hospital admissions model.
  • Integration as part of a tutorial.

These specs may be moved to a different issue involving other components of the replication of the hospital admissions model in the wastewater project.

Out of scope

  • TBD
@gvegayon
Copy link
Member Author

Hey @damonbayer, as we discussed, this could be implemeted via a latent process either extending the current implementation of the infections module or adding a new one called something like latent.InfectionsWithExpGrowth(RandomVariable).

@damonbayer
Copy link
Collaborator

damonbayer commented May 15, 2024

From my understanding, there are three key times related to this implementation:

  • $t_0$: the time where the first latent infection(s) occur
  • $t_\text{seeded}$: the time at which there is a sufficient infection history such that the renewal process can begin.
  • $t_\text{obs}$: the time at which the first observation occurs.

There is no reason that $t_\text{obs}$ couldn't come before $t_\text{seeded}$, but in the current hospitalization model tutorial (example-with-datasets), we have $t_0 < t_\text{seeded} < t_\text{obs}$.

This issue relates to generating $I(t)$ for $t \in [t_0, t_{\text{seeded}}]$. In the current model, we have $I(t) = I_0$ for $t \in [t_0, t_{\text{seeded}}]$ and we only save $I(t)$ for $t \geq t_{\text{seeded}}$.

When we have variation in $I(t)$ for $t \in [t_0, t_{\text{seeded}}]$, I assume we will want to keep track of all of these values. Is that correct?

@gvegayon @dylanhmorris

@gvegayon
Copy link
Member Author

When we have variation in [math] for [math], I assume we will want to keep track of all of these values. Is that correct?

Yes. Since the only sampled quantities in the equation are $I_0$ and $r$, the rest of the sequence is fully deterministic. You can use the numpyro.deterministic function to tag that and ask the model to keep track of it, e.g.,

Rt = npro.deterministic("Rt", self.Rt_transform.inverse(Rt_trans_ts))

That said, I am not sure I'm following why we need $t_{seeded}$ and not only $t_0$ and $t_{obs}$. What am I missing?

@damonbayer
Copy link
Collaborator

damonbayer commented May 15, 2024

$t_\text{seeded} \neq t_\text{obs}$ corresponds to the idea of padding in the current hospitalization model tutorial (example-with-datasets).

In that model, we have $I(t) = I_0$ for $t \in [t_0, t_{\text{seeded}}]$. Then $I(t)$ follows the renewal process for $t > t_\text{seeded}$. The observations don't start until some time later, $t_\text{obs} = t_\text{seeded} +$ padding

You could also imagine a scenario where $t_\text{obs} < t_\text{seeded}$ which would be like negative padding. This points to the idea that the $I(t)$ vector should contain $I(t)$ for $t > t_0$. In the current implementation it only contains $I(t)$ for $t > t_\text{seeded}$.

@damonbayer
Copy link
Collaborator

So, I am thinking latent/i0.py should be made more generic to contain the concept of $I(t)$ for $t \in [t_0, t_{\text{seeded}}]$. Then that would be used with sample_infections_rt to get $I(t)$ for $t > t_0$, which forms the basis for the observations.

@dylanhmorris
Copy link
Collaborator

I agree with @damonbayer; my only minor quibble is notational. Proposed default: let $t_0 = 0$ denote the first timepoint at which $I(t)$ is generated by the renewal process according to some $\mathcal{R}(t_0)$ (versus "seeded").

i.o.w. seeding times are by default negative: $t_\mathrm{firstseed} < t_0 = 0$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants