GMM

GMM

Creator
Creator
Seonglae Cho
Created
Created
2023 May 16 2:43
Editor
Edited
Edited
2025 Mar 25 10:57

Gaussian Mixture Model, Mixture of Gaussian, MoG

The Gaussian Mixture distribution is a linear superposition of Gaussians. Mixture models can be used to build complex distribution and to cluster data.
p(x)=k=1KπkN(xμk,Σk)p(x) = \sum_{k=1}^K\pi_k N(x|\mu_k, \Sigma_k)
각 데이터 포인트가 특정한 가우시안 분포에서 생성된다고 가정하고 z variables are
Latent Variable
Multinomial Distribution
p(zk=1)=πk,p(z)=k=1Kπkzk,k=1Kπk=1p(z_k=1) = \pi_k, p(z) = \prod_{k=1} ^K \pi_k^{z_k}, \sum_{k=1}^K \pi_k = 1
we introduce K-dimensional binary random variable z in which only one element zk is equal to 1 and the others are all 0.
p(xzk=1)=N(xμk,Σk),p(xz)=k=1KN(xμk,Σk)zkp(x|z_k = 1) = N(x|\mu_k , \Sigma_k) , p(x|z) = \prod_{k=1}^{K} N(x|\mu_k , \Sigma_k)^{z_k}
Therefore we can induce first equation easily using
Marginalization
p(x)=zp(xz)p(z)=zk=1KN(xμk,Σk)zkk=1Kπkzk=k=1KπkN(xμk,Σk)p(x) = \sum_{z} p(x|z) p(z) = \sum_{z} \prod_{k=1}^{K} N(x|\mu_k, \Sigma_k)^{z_k} \prod_{k=1}^{K} \pi_k^{z_k}= \sum_{k=1}^{K} \pi_k N(x|\mu_k, \Sigma_k)

Responsibility γ\gamma

γ(znk)\gamma(z_{nk}) is responsibility of component kk for xnx_n
γ(zk)=p(zk=1x)=p(xzk=1)p(zk=1)p(x)=πkN(xμk,Σk)j=1KπjN(xμj,Σj)\gamma(z_k) = p(z_k = 1|x) = \frac{p(x|z_k=1)p(z_k =1)}{p(x)} \\ = \frac{\pi_k N(x|\mu_k, \Sigma_k)}{\sum_{j=1}^{K} \pi_j N(x|\mu_j, \Sigma_j)}

Likelihood

p(Xπ,μ,Σ)=n=1Np(xnπ,μ,Σ) =n=1Nk=1Kp(xnz=k)p(z=k) =n=1Nk=1KπkN(xnμk,Σk)p(X|\pi, \mu, \Sigma) = \prod_{n=1}^{N} p(x_n|\pi, \mu, \Sigma) = \prod_{n=1}^{N} \sum_{k=1}^{K} p(x_n|z=k)p(z=k) = \prod_{n=1}^{N} \sum_{k=1}^{K} \pi_k N(x_n|\mu_k, \Sigma_k)

Log Likelihood

logp(Xπ,μ,Σ)=n=1Nlog(k=1KπkN(xnμk,Σk))\log p(X|\pi, \mu, \Sigma) = \sum_{n=1}^{N} \log \left( \sum_{k=1}^{K} \pi_k N(x_n|\mu_k, \Sigma_k) \right)
 
 
 
 
 

Recommendations