Modelization of COVID-19 for Mainland China

This page is a model optimization for the evolution of COVID-19 for Mainland China.

Data

Our modelization is based on the real-time data from Johns Hopkins University. Here are the data in my Python script:

yChina = np.array([278, 326, 547, 639, 916, 2000, 2700, 4400, 6000, 7700, 9700, 11200, 14300, 17200, 19700, 23700, 27400, 30600, 34100, 36800, 39800, 42300, 44300, 44700, 59800, 66300, 68300, 70400, 72400, 74100, 74500, 75000, 75500, 76900, 76900, 77200, 77700, 78100, 78500, 78800, 79300, 79800, 80000, 80200, 80300, 80400, 80600, 80700, 80700, 80700, 80800, 80900, 80900, 80900, 81000, 81000, 81000])
xChina = np.linspace(1, yChina.size, yChina.size)
plt.scatter(xChina, yChina, s=5)
plt.title('Mainland China')
plt.xlabel('Days (since 20th of January 2020)')
plt.ylabel('Confirmed')
plt.grid()
plt.show()

Here is our reference data:

Dataset for the Mainland China

Model

The following is based on the assumption that the propagation of the COVID-19 follows an exponential law, our model will be a sigmoid function.

COVID-19 confirmed cases for mainland China

Let's considere the following sigmoid function:

$$ y = \frac { \lambda } { 1 + e^{-\alpha(x-n)} } $$

Where:

def model(x, lam, alpha, n):
    return lam / (1 + exp(-alpha*(x-n)))

Our goal here is to estimate the above parameters in order the fit the model to the real data.

Optimization

The optimization is made with LMFIT, Non-Linear Least-Squares Minimization and Curve-Fitting for Python.

Here is the code for the optimization:

gmodel = Model(model)
params = gmodel.make_params(lam=81000, alpha=0.2, n=20)
result = gmodel.fit(yChina, x=xChina, lam=40000, alpha=0.2, n=10)

Here is the result of optimization, we estimate the following parameters:

Modelization of COVID-19 for Mainland China

Test and run the source code on Google Colabory.

See also


Last update : 03/16/2020