# 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:

## 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.

Let's considere the following sigmoid function:

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

Where:

• $$\lambda$$ is the number of confirmed case at the peak
• $$\alpha$$ is the propagation rate of the virus
• $$n$$ is the number of days since the first data (20th of january 2020)
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:

• $$\lambda = 80954.3863 \pm 490.839259 ( 0.61 \% )$$
• $$\alpha = 0.21600181 \pm 0.00662431 ( 3.07 \% )$$
• $$n = 20.6996270 \pm 0.16547593 ( 0.80 \% )$$

Test and run the source code on Google Colabory.