epidemics / covid

epidemicforcasting.org visualization repository
http://epidemicforecasting.org
GNU Affero General Public License v3.0
20 stars 12 forks source link

Add convolved timeseries #441

Open mathijshenquet opened 4 years ago

mathijshenquet commented 4 years ago

Background

Gleamviz works with a SIR like model where people move between the following categories:

image

The category Recovered does not actually mean 'recovered' in the colloquial sense of the word. Instead it means that the patient is no longer infecting other people, for this reason the term Removed is preferred. The difference is that sick people which are in a hospital or self isolating will not be infecting a lot of people any more so for the SIR model they are already in the R category.

The backend receives receives two timeseries from gleamviz from which R and I are reconstructed: B - the amount of people moving from category S to I G - the amount of people moving from category I to R

Note that this is probably an oversimplification of how gleamviz works but it should be right enough for our purpose here.

Feature request

Currently we are displaying the I timeseries, it would be useful to also be able to display the amount of predicted sick P_sick or predicted critical patients P_crit. The timeseries P_x are determined by a distribution D_x which gives the probability of a patient being x at time t given that they are infected at t = 0. This distribution has to be convolved with the signal B.

Of most interest is the case where x = sick, but x = crit (= needing ICU care) is also important so keeping the code general so that other distributions can be used would be helpful.

Why do we want this

Step 1: Verify research

Determine the right distributions to use and verify the methodology described above. Last time I looked into this was a good source (see summary -> findings). What I wrote here is my understanding and I'm reasonably sure that it is right (70% confidence). Jan Kulveit would be the person to verify this with.

Step 2: Add convolution to epimodel

Add the convolution logic, this should be coordinated with @gavento the main developer of epimodel.

Some pointers:

Step 3: Add convoluted timeseries to the web export

The timeseries are computed and then added to extdata-*.json files. Apart from infected, recovered, active there should be the x = sick and possibly the ability to add other convolution based timeseries. Questions about this can be asked to me.

Some pointers:

hnykda commented 4 years ago

An extremely well described task Mathijs :+1: :heart: , I appreciate all the hard work you have done here.

Alexandra-Vogt commented 4 years ago

So I was re-reading the document and it appears that the data for the distribution are present only for deaths in that paper and not for critical or symptomatic patients (see figure 2 on page 15). Certainly you could use the onset-of-symptoms-to-recovery charts to sort of hack together something approximating P_crit numbers, but I would feel rather nervous doing so as I am not a data scientist at all. I will be looking for other papers as well in the mean time and will update if I can find the relevant distributions.

But I do think I can provide you with death numbers, which is something that we do not do yet. So if you want to add that to the spec I can definitely get working on that.

mathijshenquet commented 4 years ago

I believe onset-to-recovery is for hospitalised patients so using it as a proxy should be fine. We could combine it with a onset-to-critical dist and the critical rate to get the required dist.