Probabilistic PCA models x=Wz+μ+ϵ with z∼N(0,Iq) and ϵ∼N(0,σ2Id). The maximum-likelihood solution is WML=Uq(Λq−σ2I)1/2R and σML2=1d−q∑j>qλj. (a) For d=4 and sample covariance eigenvalues 6,3,0.6,0.4, find σML2 and the scale of each column of WML for q=2. (b) Why does the covariance of the model match the data in the top q directions? (c) How does PPCA relate to ordinary PCA as σ2→0?

Unsupervised learning, Probabilistic PCA
Level L3 Intermediate. Length Long. Nature Th+Mat Both.

What's being asked

Whether you can interpret the closed-form PPCA solution, evaluate it numerically, and connect it to PCA.

Key idea

The model covariance is C=WW⊤+σ2I; its eigenvalues are λj−σ2+σ2 in the top q directions and σ2 elsewhere, so the ML fit sets σ2 to the average discarded eigenvalue.

Steps

  1. Marginalising out z gives x∼N(μ,C) with C=WW⊤+σ2I. The ML solution matches C to the sample covariance S with eigenpairs (λj,uj).
  2. Noise: σML2=1d−q∑j>qλj=0.6+0.42=0.5. It is the variance left over in the discarded directions, averaged.
  3. Loadings: column j of WML (before the arbitrary rotation R) is λj−σ2 uj. So the scales are 6−0.5=5.5≈2.345 and 3−0.5=2.5≈1.581.
  4. Check: C=WW⊤+σ2I has eigenvalues (5.5+0.5, 2.5+0.5, 0.5, 0.5)=(6,3,0.5,0.5). The top two agree with S exactly, and the trace is 10, the same as the trace of S, which is 6+3+0.6+0.4=10.
  5. The latent posterior is z∣x∼N(M−1W⊤(x−μ), σ2M−1) with M=W⊤W+σ2I.
  6. As σ2→0, W→UqΛq1/2 and M−1W⊤→Λq−1/2Uq⊤, so the posterior mean becomes the whitened PCA projection, with the posterior variance shrinking to 0. This is ordinary PCA.
  7. Advantages over PCA: a proper likelihood (model comparison, choosing q), handling of missing data by EM, and mixtures of PPCA.

Common mistakes

How long your answer should be

One page; 7–8 minutes.

Last checked on 4 December 2026.

Read this

Previous in Unsupervised learning: In alternating least squares (ALS) for matrix factorisation, a user has rated two items, with item vectors q1=(1,0) and q2=(1,1) fixed and ratings 3 and 5. (a) Derive the update that minimises ∑i(ri−p⊤qi)2+λ∥p∥2 for the user vector p. (b) Compute p for λ=1, and for λ=0. (c) Why is ALS attractive for large recommenders?
Next in Unsupervised learning: A variational autoencoder's encoder outputs, for a 1-D latent code, a mean μ=1 and standard deviation σ=0.5. (a) Compute KL(N(μ,σ2) ∥ N(0,1)). (b) Draw z by the reparameterisation trick if the noise sample is ε=0.8. (c) Why do we need this trick, and what role does the KL term play compared with a plain autoencoder?