Updated at

Gaussian Mixture Model

From K-means we know that:

  • K-means forces clusters to be spherical
  • In K-means clustering every point can only belong to one cluster

But sometimes it might be desirable to have elliptical clusters than spherical clusters. And what if there is a data point right in the center of two clusters?

Gaußian Mixture Mode

With a random variable XX, the mixed Gaussian model can be expressed by:

p(x)=∑k=1KπkN(X∣μk,Σk)p(x)=\sum_{k=1}^{K} \pi_{k} \mathcal{N}\left(X | \mu_{k}, \Sigma_{k}\right)

where N(X∣μk,Σk)\mathcal{N}\left(X | \mu_{k}, \Sigma_{k}\right) is the kthk^{th} component of the mixture model.

Generalized Form

Then we can generate a generalized form:

p(X∣M,Σ,π)=∏i=1s∑k=1KπkN(xi∣μk,Σk)p(X | M, \Sigma, \pi)=\prod_{i=1}^{s} \sum_{k=1}^{K} \pi_{k} \mathcal{N}\left(x_{i} | \mu_{k}, \Sigma_{k}\right)
forN(xi∣μk,Σk)=1(2π)ndet⁡(Σk)e−12⟨Σk−1(xi−μk),xi−μk⟩\text{for} \quad \mathcal{N}\left(x_{i} | \mu_{k}, \Sigma_{k}\right)=\frac{1}{\sqrt{(2 \pi)^{n} \operatorname{det}\left(\Sigma_{k}\right)}} e^{-\frac{1}{2}\left\langle\Sigma_{k}^{-1}\left(x_{i}-\mu_{k}\right), x_{i}-\mu_{k}\right\rangle}

where

X=(x1x2…xs)∈Rn×s input data X=\left( \begin{array}{llll}{x_{1}} & {x_{2}} & {\dots} & {x_{s}}\end{array}\right) \in \mathbb{R}^{n \times s} \quad \text { input data }

M=(μ1μ2…μK)∈Rn×K prototype vectors M=\left( \begin{array}{llll}{\mu_{1}} & {\mu_{2}} & {\dots} & {\mu_{K}}\end{array}\right) \in \mathbb{R}^{n \times K} \quad \text { prototype vectors }

Σ=(Σ1Σ2…ΣK)∈Rn×n×K covariance matrices \Sigma=\left(\Sigma_{1} \quad \Sigma_{2} \quad \ldots \quad \Sigma_{K}\right) \in \mathbb{R}^{n \times n \times K} \quad \text { covariance matrices }

π=(π1π2…πK)∈RK×1 mixing weights\pi=\left( \begin{array}{llll}{\pi_{1}} & {\pi_{2}} & {\dots} & {\pi_{K}}\end{array}\right) \in \mathbb{R}^{K \times 1} \quad \text { mixing weights} and πk≥0 for all k∈{1,…,K} as well as ∑k=1Kπk=1\text { and } \quad \pi_{k} \geq 0 \quad \text { for all } \quad k \in\{1, \ldots, K\} \quad \text { as well as } \sum_{k=1}^{K} \pi_{k}=1

Now the goal for the algorithm is: given X , determine the parameters M, Σ and π (for example by maximizing the likelihood)

Model Iteration Illustration

✦ Fizzy

A beautiful, minimalist, and modern starter built with the best practices of the web.

@ 2026 Fizzy All rights reserved.

Powered by Spell AI