BRAGA

02 Writing02-02 Notes02-02-462

Marginal Likelihood

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
p(x)=N(x∣μ,C),C=WW⊤+σ2Ip(x) = \mathcal{N}(x \mid \mu, C), \quad C = WW^\top + \sigma^2 I
(1)

We are working on the marginal likelihood in Probabilistic PCA, where the latent variable zz is integrated out and the observed variable xx follows a Gaussian distribution. The canonical formula is

p(x)=N(x∣μ,C),C=WW⊤+σ2I,p(x) = \mathcal{N}(x \mid \mu, C), \quad C = WW^\top + \sigma^2 I,
(2)

under the assumptions that z∼N(0,I)z \sim \mathcal{N}(0, I) and x∣z∼N(Wz+μ,σ2I)x \mid z \sim \mathcal{N}(Wz + \mu, \sigma^2 I). This shows that PPCA models the data as a Gaussian with low-rank structured covariance plus isotropic noise.

Deep Breakdown

The marginal likelihood in Probabilistic PCA is the probability distribution of the observed data point xx after the latent variable zz has been integrated out.

In PPCA, the generative model is:

z∼N(0,I)z \sim \mathcal{N}(0, I)
(3)
x∣z∼N(Wz+μ,σ2I)x \mid z \sim \mathcal{N}(Wz + \mu, \sigma^2 I)
(4)

This means each observation is generated from a hidden low-dimensional Gaussian factor zz, linearly mapped through WW, shifted by μ\mu, and then perturbed by isotropic Gaussian noise. But in practice, the latent variable is not observed. So to obtain the data distribution we actually see, we integrate over all possible latent values:

p(x)=∫p(x∣z) p(z) dzp(x) = \int p(x \mid z)\,p(z)\,dz
(5)

Because both the prior over zz and the conditional distribution of xx given zz are Gaussian, the result is also Gaussian:

p(x)=N(x∣μ,C)p(x) = \mathcal{N}(x \mid \mu, C)
(6)

with covariance

C=WW⊤+σ2IC = WW^\top + \sigma^2 I
(7)

Inputs:

  • loading matrix W∈Rd×kW \in \mathbb{R}^{d \times k},
  • mean vector μ∈Rd\mu \in \mathbb{R}^{d},
  • isotropic noise variance σ2\sigma^2.

Output:

  • a Gaussian distribution over the observed vector xx.

Why this matters in DA/DS:

  • it gives PPCA a full probabilistic interpretation,
  • it explains observed covariance as structured signal plus isotropic noise,
  • it provides a likelihood for fitting parameters,
  • it allows probabilistic comparison across latent dimensionalities,
  • it shows why PPCA is closely related to classical PCA.

The covariance matrix CC has two distinct pieces:

  1. WW⊤WW^\top, a low-rank matrix capturing the systematic covariance induced by the latent factors,
  2. σ2I\sigma^2 I, a full-rank isotropic noise term capturing unstructured residual variation.

This decomposition is the core of PPCA. It says that the data covariance is not arbitrary. Instead, it comes from a lower-dimensional signal subspace, plus equal noise in all observed directions.

This object links directly to:

  • Generative Model, because it comes from integrating out zz,
  • Latent Variable Prior, because the standard Gaussian prior is part of the derivation,
  • Eigenstructure, because the covariance CC reveals how PPCA connects to principal directions,
  • Maximum likelihood parameters, because parameter estimation in PPCA is based on maximizing the observed-data likelihood.

Flowchart

Start with latentprior z ~ N(0, I)Defineobservationmodel x | z ~N(Wz + μ, σ²I)Treat z asunobservedIntegrate p(x |z)p(z) over zObtain Gaussianmarginaldistribution for xSet mean of x toμSet covarianceC = WWᵀ + σ²IInterpret WWᵀas structuredlow-rankcovarianceInterpret σ²I asisotropic noiseUse likelihoodfor fitting, modelcomparison, andPCAinterpretation

#machine-learning#machine-learning-algorithms#probabilistic-pca-ppca

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