BRAGA

02 Writing02-02 Notes02-02-428

Log-Likelihood Objective

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
ℓ(θ)=∑i=1nlog⁡(∑k=1Kπk N(xi∣μk,Σk))\ell(\theta) = \sum_{i=1}^{n} \log \left( \sum_{k=1}^{K} \pi_k \,\mathcal{N}(x_i \mid \mu_k, \Sigma_k) \right)
(1)

We are working on the log-likelihood objective for Gaussian Mixture Models, where the canonical formula is

ℓ(θ)=∑i=1nlog⁡(∑k=1Kπk N(xi∣μk,Σk)),\ell(\theta) = \sum_{i=1}^{n} \log \left( \sum_{k=1}^{K} \pi_k \,\mathcal{N}(x_i \mid \mu_k, \Sigma_k) \right),
(2)

with parameters θ={πk,μk,Σk}k=1K\theta = \{\pi_k, \mu_k, \Sigma_k\}_{k=1}^{K}. This objective measures how well a GMM explains the observed data under the assumptions of valid mixture weights, Gaussian component densities, and i.i.d. observations.

Deep Breakdown

The log-likelihood objective is the central training criterion for a Gaussian Mixture Model, GMM. A GMM assumes that each observation xix_i was generated from one of KK Gaussian components, but we do not know which component generated which point. Instead of assigning a point to only one Gaussian, the model treats the observed density as a weighted sum of Gaussian densities.

For one data point xix_i, the model density is:

p(xi∣θ)=∑k=1Kπk N(xi∣μk,Σk)p(x_i \mid \theta) = \sum_{k=1}^{K} \pi_k \,\mathcal{N}(x_i \mid \mu_k, \Sigma_k)
(3)

where:

  • πk\pi_k is the mixture weight of component kk,
  • μk\mu_k is the mean of component kk,
  • Σk\Sigma_k is the covariance of component kk.

Because the observations are assumed independent and identically distributed, the full likelihood for the dataset is the product of these mixture densities across all observations.

Taking the logarithm gives the log-likelihood:

ℓ(θ)=∑i=1nlog⁡(∑k=1Kπk N(xi∣μk,Σk))\ell(\theta) = \sum_{i=1}^{n} \log \left( \sum_{k=1}^{K} \pi_k \,\mathcal{N}(x_i \mid \mu_k, \Sigma_k) \right)
(4)

Inputs:

  • dataset x1,…,xnx_1, \dots, x_n,
  • number of components KK,
  • mixture weights πk\pi_k,
  • means μk\mu_k,
  • covariances Σk\Sigma_k.

Output:

  • a scalar score, the log-likelihood, telling us how well the current GMM parameters explain the data.

Why it matters in DA/DS:

  • it is the objective maximized during GMM training,
  • it provides a direct measure of model fit,
  • it is used to monitor EM convergence,
  • it helps compare candidate models, often alongside AIC or BIC,
  • it reveals when a model is fitting the data better or collapsing into degenerate solutions.

This objective is tricky because of the inner sum over components inside the logarithm. If the component identity were known, the optimization would be much simpler. But because the generating component is latent, direct maximization is harder. That is exactly why the EM algorithm exists. EM works by optimizing a surrogate lower bound that guarantees the observed-data log-likelihood does not decrease at each iteration.

So conceptually:

  • the log-likelihood is the true target,
  • EM is the practical optimization procedure,
  • responsibilities arise because the latent component labels are unknown.

This object links directly to:

  • EM Algorithm, because EM is designed to maximize this objective,
  • responsibilities, because they appear in the latent-variable reformulation,
  • convergence, because EM is typically monitored by changes in log-likelihood,
  • degenerate solutions, because unconstrained GMM likelihood can blow up in pathological cases.

Flowchart

Start withdataset x_1 tox_nSpecify GMMparameters θ ={π_k, μ_k, Σ_k}For each pointx_i, computemixture densityΣ_k π_k N(x_i |μ_k, Σ_k)Take log of eachpoint densitySum across allobservationsObtainlog-likelihoodℓ(θ)Use EM toincrease ℓ(θ)iterativelyMonitorconvergenceacross iterationsCheck foroverfitting ordegeneratecovariancecollapseUse finalobjective for fitassessment andmodelcomparison

#machine-learning#machine-learning-algorithms#density-estimation-gaussian-mixture-models-gmm

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