Study on the propagation model of COVID-19 varieties in the United Kingdom | Jim Zhang's blog
Study on the propagation model of COVID-19 varieties in the United Kingdom2022-08-10

Once you see a sentence wrapped in red, that means it's not finished.

## 利用 EM 算法估计混合三参数 logistic 模型的参数

Birnbaum1 introduced 3-parameter logistic model by adding parameters to traditional logistic model. The 3-parameter logistic model is more flexible and easier to apply than traditional logistic model. The model can be expressed as:

Its differential function is:

3-parameter mixture model is a linear combination of several 3-parameter logistic models, where the weight coefficients of each model equals to 1. This model is easy to fit and can be used to estimate . The mixture model is:

where .

In order to estimate the parameters of the mixture model, we turn into following probability density function:

let , then we can rewrite the above equation as:

where meets the restriction , , , are all estimands of the parameters of the mixture model.

There are various methods to estimate parameters in the 3-parameter mixture model, among which maximum likelihood estimation (MLE) and EM algorithm are widely used. EM (Expectation-Maximization) algorithm is a standard algorithm that iteratively estimates the parameters of the mixture model, which converges to the MLE of mixture parameters.

Dempster and Rubin introduces EM algorithm in 19772, it is an iterative algorithm that combines calculation of expectation of probability density function using designated values of missing parameters (E-step) and re-estimation (maximization) of parameters using the result of E-step (M-step). The estimation process of the parameters , , via EM algorithm is written as follows:

1. Set the value of , in this study. Initialize the parameters , , with , , .

2. E-step —— calculate the likelihood function

let and the sample series contains samples, and the probability density function of is:

Its logarithm is:

3. M-step —— calculate posterior probabilities and , ,

For convenience, we will calculate ，即 first:

Because meets the restriction , we use Lagrange multiplier to solve . Langrange function can be written as:

let

denote , where is Bayesian posterior probability, then

Obviously, . In addition, considering , then

The solution is . Bring it back to the original equation, we have

Then calculate ，that is

let

In a nutshell,

4. Repeat E-step and M-step, 直到参数收敛到所需精度。

## -means 时间序列聚类

k-means 算法的特点

-means is a simple algorithm aiming to partition a set of data into clusters by comparing their distance between mean of the clusters.

1. K regions are r

2. 在所有样本中随机选取 个地区分别作为 个聚类的中心，在本研究中，

3. 分配步：将所有样本按其与其最接近（通过 DTW 距离度量）的聚类中心按照数量均等分配给 个群组，即根据这种方法生成的 Voronoi 图对所有样本进行划分，即

其中 表示第 个聚类， 表示第 个聚类的中心， 表示时间序列向量 的 DTW 距离，其定义如下：

where indicates the Euclidean distance between and is a path which meets following conditions:

• ,
• ,
• .
4. Update step: Recalculate centroids for observations assigned to each cluster.

5. Repeat assignment step and update step until convergence. The algorithm terminates when the assignments no longer change.

## Footnotes

1. Birnbaum, A. L. (1968). Some latent trait models and their use in inferring an examinee's ability. Statistical theories of mental test scores.

2. Voronoi, G. (1908). Nouvelles applications des paramètres continus à la théorie des formes quadratiques. Premier mémoire. Sur quelques propriétés des formes quadratiques positives parfaites. Journal für die reine und angewandte Mathematik (Crelles Journal), 1908(133), 97-102.