Lewuathe / COVID19-SIR

COVID-19 SIR model estimation
https://www.lewuathe.com/covid-19-dynamics-with-sir-model.html
Apache License 2.0
131 stars 75 forks source link

Estimate number of deaths #13

Open giulianobelinassi opened 4 years ago

giulianobelinassi commented 4 years ago

Hi. I found your work very interesting :)

I see you are using a SIR-based model, but that doesn't seem to model the number of deaths. I propose a simple modification to this model. Basically SIR consists of three differential equations:

SIR

Here, the number of 'recovery' englobes both cured and deaths. This parameter is represented by γ, and therefore it could be split in two by γ = a + b, where a is the rate of cure, and b is the rate of death. Since the death rate seems to be linear (1.5% in China, for example), this linear decomposition of γ looks precise to me. After this, we can add a new variable k, (Kill rate), and add to the system of equations. Therefore:

SIRK

I could generate the following graphic using this method:

Italy

With S_0 = 200000

Italy

However, I am not sure about how to handle this expression: return alpha * l1 + (1 - alpha) What is exactly the point of this linear interpolation? Here I will need to add another parameter to compensate for the death rate.

I can open a PR if you guys are interested.

I am also interested in using this software to simulate the situation here in Brazil. I have already collected some data. The idea is that a and b can change according to the situation of the healthcare system.

Thank you.

riccardodg commented 4 years ago

Very nice code. I also have data for Italy. Including regional data. I'll put the code on github crediting all your work. BTW do you have a preferred way to be cited? I simulated everything without dead men. Dead should not be part of the game since we are not sure they are dead by covid, we know that they had the covid. Another idea is to suppose infected are ony a minimal percentage. My opinion is that this covid touches (already did) 80% of population, so bhow to manage it?

giulianobelinassi commented 4 years ago

Hi, Riccardo

I have just submitted a PR with the proposed changes for revision. Although I am a graduate student, my research field is not population or disease growth. I am doing this because I got bored in quarantine. I am also not planning to publish a paper about this. So feel free to give credit the way you feel it is better :)

If you are saying that the virus has already infected 80% of the population, then the data we are working here may not be precise. It will be necessary to find a precise estimate of \beta and \gamma, and then run the simulation with S_0 = 0.8*POPULATION. I think in this case the death rate might be much lower than we have here. Also, the simulation can take a long time in this case.

As for deaths by COVID-19, maybe it can be estimated by comparing with the death rate of pneumonia of 2019, in the same period of time?

Maybe it is possible to estimate the number of people subjected to the disease by the measures the government is applying to contain the infection?

Thank you.

gasilva commented 4 years ago

Hi,

The pointo of Giuliano is good because death rates are more reliable that number of infected cases. In Brazil we have the situation of under report because we are not testing people. A ways to workaround this is consider death rates.

gasilva commented 4 years ago

Hi. I found your work very interesting :)

I see you are using a SIR-based model, but that doesn't seem to model the number of deaths. I propose a simple modification to this model. Basically SIR consists of three differential equations:

SIR

Here, the number of 'recovery' englobes both cured and deaths. This parameter is represented by γ, and therefore it could be split in two by γ = a + b, where a is the rate of cure, and b is the rate of death. Since the death rate seems to be linear (1.5% in China, for example), this linear decomposition of γ looks precise to me. After this, we can add a new variable k, (Kill rate), and add to the system of equations. Therefore:

SIRK

I could generate the following graphic using this method:

Italy

With S_0 = 200000

Italy

However, I am not sure about how to handle this expression: return alpha * l1 + (1 - alpha) What is exactly the point of this linear interpolation? Here I will need to add another parameter to compensate for the death rate.

I can open a PR if you guys are interested.

I am also interested in using this software to simulate the situation here in Brazil. I have already collected some data. The idea is that a and b can change according to the situation of the healthcare system.

Thank you.

You can use this expression....

l1 = np.sqrt(np.mean((solution.y[1] - data)**2))
l2 = np.sqrt(np.mean((solution.y[2] - recovered)**2))
l3 = np.sqrt(np.mean((solution.y[3] - death)**2))
return 0.2 * l1 + 0.4 * l2 + 0.4*l3

It is an average only among these three values. In other other had you can also use another optimization algorithm with multi-objective instead of this with single objective