BRAGA

02 Writing02-02 Notes02-02-440

M-Step (Means Update)

Published 16 Apr 20262 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
μknew=∑i=1nrikxi∑i=1nrik\mu_k^{\text{new}} = \dfrac{\sum_{i=1}^n r_{ik} x_i}{\sum_{i=1}^n r_{ik}}
(1)

We are working on the M-Step means update in the Expectation-Maximization algorithm for Gaussian Mixture Models, with canonical formula μknew=∑i=1nrikxi∑i=1nrik\mu_k^{\text{new}} = \dfrac{\sum_{i=1}^n r_{ik} x_i}{\sum_{i=1}^n r_{ik}}, where rikr_{ik} is the responsibility of component kk for observation xix_i. The domain is EM for GMMs with soft cluster assignments, finite data, and valid responsibilities satisfying rik≥0r_{ik} \ge 0 and ∑k=1Krik=1\sum_{k=1}^K r_{ik} = 1 for each observation. This update computes the new mean of component kk as a responsibility-weighted average of the data.

Deep Breakdown

In a Gaussian Mixture Model (GMM), we assume the data is generated by a mixture of KK Gaussian components.

Each component has its own parameters:

  • mean μk\mu_k,
  • covariance Σk\Sigma_k,
  • mixing weight πk\pi_k.

The EM algorithm estimates these parameters iteratively.

It alternates between:

  1. E-Step: compute soft assignments, called responsibilities,
  2. M-Step: update model parameters using those responsibilities.

The means update belongs to the M-Step. After the E-Step, each observation xix_i is no longer assigned to exactly one cluster. Instead, it contributes partially to multiple components through rikr_{ik}, the posterior probability that observation ii belongs to component kk.

The new mean for component kk is:

μknew=∑i=1nrikxi∑i=1nrik\mu_k^{\text{new}} = \frac{\sum_{i=1}^n r_{ik} x_i}{\sum_{i=1}^n r_{ik}}
(2)

This formula is a weighted mean:

  • the numerator adds the data points, each scaled by how much component kk “owns” that point,
  • the denominator normalizes by the total responsibility mass assigned to component kk.

This is the soft-clustering analogue of the ordinary sample mean.

Why this matters in DA/DS:

  • Soft clustering: unlike K-means, each point can contribute to multiple cluster centers.
  • Probabilistic segmentation: useful when groups overlap.
  • Stable parameter updates: outliers or ambiguous points can be down-weighted by low responsibility.
  • Interpretability: each mean represents the center of a latent Gaussian segment.
  • Foundation for full EM: the means update works together with covariance and mixing-weight updates.

A useful intuition:

  • if a point has high responsibility for component kk, it pulls μk\mu_k strongly,
  • if it has low responsibility, it barely affects μk\mu_k,
  • if responsibilities are exactly 0 or 1, this reduces to the ordinary cluster mean.

So the M-step means update is a “soft centroid” calculation.

Flowchart

Start withcurrent GMMparametersRun E-Step tocomputeresponsibilitiesr_ikPick componentkWeight eachobservation x_iby responsibilityr_ikSum weightedobservations:sum_i r_ik x_iComputeeffective clustersize: sum_i r_ikDivide weightedsum by effectivecluster sizeUpdate meanmu_k^newRepeat for all Kmixturecomponents

#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