BRAGA

02 Writing02-02 Notes02-02-441

M-Step (Weights Update)

Published 16 Apr 20262 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
πknew=NkN\pi_k^{\text{new}} = \frac{N_k}{N}
(1)

We are working on the mixture-weight update in the M-step of the EM algorithm for Gaussian Mixture Models. The canonical formula is

πknew=NkN,\pi_k^{\text{new}} = \frac{N_k}{N},
(2)

where

Nk=∑i=1NrikN_k = \sum_{i=1}^{N} r_{ik}
(3)

is the effective number of observations assigned softly to component kk, and NN is the total number of observations. This update estimates component prevalence while enforcing the constraint that all mixture weights are nonnegative and sum to 1.

Deep Breakdown

In a Gaussian Mixture Model, each component has a mixture weight πk\pi_k. That weight represents how prevalent component kk is in the population according to the model. If πk\pi_k is large, the model believes that component explains a large portion of the data. If πk\pi_k is small, the component is relatively rare. In the EM algorithm, mixture weights are updated during the M-step after the E-step has computed the responsibilities:

rik=p(zi=k∣xi,θ)r_{ik} = p(z_i = k \mid x_i, \theta)
(4)

where rikr_{ik} is the soft assignment of observation ii to component kk. Because GMM clustering is soft, we do not count hard membership labels. Instead, we compute the effective component size:

Nk=∑i=1NrikN_k = \sum_{i=1}^{N} r_{ik}
(5)

This is the soft count of how much total responsibility component kk carries across all observations.

The new mixture weight is then:

πknew=NkN\pi_k^{\text{new}} = \frac{N_k}{N}
(6)

Inputs:

  • the responsibilities rikr_{ik} from the E-step,
  • the total dataset size NN.

Output:

  • updated mixture weights π1new,…,πKnew\pi_1^{\text{new}}, \dots, \pi_K^{\text{new}}.

Why this matters in DA/DS:

  • it quantifies how common each latent cluster is,
  • it affects the next E-step because weights enter posterior responsibility calculations,
  • it helps interpret component prevalence,
  • it can reveal collapsing or redundant components,
  • it is essential for maintaining a valid mixture distribution.

This update is the soft-clustering analogue of computing class proportions. In a hard-assignment clustering setting, you would count how many points fell into each cluster and divide by NN. In a GMM, each point contributes fractionally to several components, so the component size becomes a soft count.

This object links directly to:

  • Effective Component Size, because NkN_k is the numerator,
  • E-Step responsibilities, because weights are estimated from those posterior probabilities,
  • Means update, because the same soft counts normalize component means,
  • Covariance update, because the same effective counts normalize component covariances.

Flowchart

Start withcurrent GMMparametersE-Stepcomputesresponsibilitiesr_ikFor eachcomponent k,sumresponsibilities:N_k = Σ_i r_ikCompute totalnumber ofobservations NUpdate mixtureweight: π_k^new= N_k / NCheck that allπ_k^new arenonnegativeCheck that Σ_kπ_k^new = 1Interpretπ_k^new ascomponentprevalenceUse updatedweights in nextE-StepRepeat EM untilconvergence

#machine-learning#machine-learning-algorithms#expectation-maximisation-em-for-gmms

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close