Skip to main content
. 2022 Apr 29;22(9):3403. doi: 10.3390/s22093403
Algorithm 1. The Execution Process of the EM Algorithm
Step 1: Initialize Φ(0)=(α(0),μ(0),Σ(0)) and set the iteration counter l = 0 and set ε > 0.
Step 2: For Φ(l)=(α(l),μ(l),Σ(l)), execute the following procedures:
(E-step): Calculate
    ψijl=αi(l)pi(zj;μi(l),Σi(l))p(zj;Φ(l)),j=1,2,⋯,N, i=1,2,⋯,s
         Ψi(l)=∑j=1Nψij(l),i=1,2,⋯,s
(M-step): Update Φ(l)=α(l),μ(l),Σ(l) by computing
αi(l+1)=Ψi(l)N,i=1,2,⋯,s
μi(l+1)=1Ψi(l)∑j=1Nψij(l)zj,i=1,2,⋯,s
∑i(l+1)=1Ψi(l)∑j=1Nψij(l)(zj−μi(l+1))(zj−μi(l+1))T,i=1,2,⋯,s
Step 3: If the prescribed convergence condition
maxαi(l+1)−αi(l)αi(l),μi(l+1)−μi(l)μi(l),Σi(l+1)−Σi(l)Σi(l);≤ε, ε≪1
  is satisfied, then set l∗=l+1 and exit. The optimal ML estimate of Φ is obtained by
  Φ∗=Φ(l∗). Else set l=l+1 and go back to Step 2.