-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathcem.tex
51 lines (40 loc) · 1.65 KB
/
cem.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage{algpseudocode}
\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}
\begin{document}
\pagestyle{empty}
\begin{algorithm}[ht]
\caption{Expectation-Maximization for GMM} \label{GMMEM}
\begin{algorithmic}[1]
\Require Dataset $V$, tolerance $\tau >0$.
\Ensure A GMM $\gamma^t= (\theta^t, \vec \mu^t, \vec \Sigma^t )$ that maximizes locally the likelihood $\ell(\gamma;V)$ up to tolerance $\tau$.
\vspace{10pt}
\Statex Select $\gamma^0=(\theta^0, \vec \mu^{0}, \vec \Sigma^{0} )$ using some initialization strategies.
\State $t=0$
\Repeat %from $t=0$ to
\State \textbf{ Expectation}\\
$\forall i,j$, calculate the responsibilities as:
\begin{equation}\label{responsibility}
r_{ij}^t = \frac{\theta^t_j \phi(v_i; \mu^t_j, \Sigma^t_j )}{\sum_{l=1}^k \theta^t_l \phi(v_i; \mu^t_l, \Sigma^t_l)}
\end{equation}
\State \textbf{ Maximization}\\
Update the parameters of the model as:
\begin{equation}
\theta_j^{t+1} \leftarrow \frac{1}{n}\sum_{i=1}^n r^{t}_{ij}
\end{equation}
\begin{equation}
\mu_j^{t+1} \leftarrow \frac{\sum_{i=1}^n r^{t}_{ij} v_i }{ \sum_{i=1}^n r^{t}_{ij}}
\end{equation}
\begin{equation}
\Sigma_j^{t+1} \leftarrow \frac{\sum_{i=1}^n r^{t}_{ij} (v_i - \mu_j^{t+1})(v_i - \mu_j^{t+1})^T }{ \sum_{i=1}^n r^{t}_{ij}}
\end{equation}
\State t=t+1
\Until {$\: $}
\State \begin{equation} | \ell(\gamma^{t-1};V) - \ell(\gamma^t;V) | < \tau \end{equation}
\State Return $\gamma^{t}=(\theta^t, \vec \mu^t, \vec \Sigma^t )$
\end{algorithmic}
\end{algorithm}
\end{document}