Multiple discriminant analysis (multi-class Fisher LDA) solves SBv=λSWv. For C=3 classes in d=100 dimensions with n=60 training points, how many useful discriminant directions are there, and what goes wrong with SW? How can you fix it?

Supervised learning, Fisher discriminant analysis
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you know the rank of SB and the small-sample problem of SW.

Key idea

SB has rank at most C−1, so at most C−1 directions are useful; SW is singular when n−C<d.

Steps

  1. The between-class scatter SB=∑knk(mk−m)(mk−m)⊤ is built from C vectors mk−m. They satisfy one linear relation, ∑knk(mk−m)=0, so they span at most C−1 dimensions.
  2. So SB has rank at most C−1, and SW−1SB has at most C−1 non-zero eigenvalues. Here C−1=2: only two useful directions, however large d is. Use them to project to 2-D.
  3. SW=∑k∑i∈k(xi−mk)(xi−mk)⊤ is a sum of n outer products, with C linear constraints (each class's deviations sum to zero). Its rank is at most n−C=57.
  4. Since 57<d=100, SW is singular (not invertible), so SW−1 does not exist and the method fails as stated.
  5. Fixes: first reduce dimension with PCA (keep fewer than n−C components), or add a ridge SW+ϵI (regularised LDA), or use the pseudo-inverse.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: n points are drawn uniformly in the unit ball in p dimensions. Show that the median distance from the origin to the nearest point is d=(1−(12)1/n)1/p. What is its value for n=500 with p=2 and p=10, and what does it mean for k-NN?
Next in Supervised learning: For GDA with binary y∈{0,1}, y∼Bernoulli(ϕ) and x∣y=k∼N(μk,Σ), how do you derive the maximum likelihood estimates of ϕ, μ0, μ1 and Σ from n labelled points?