Lably
Skip to content

Kernel Fisher discriminant analysis

  • 3 min read
  • 5 chapters

Related on Lably

Through Statistics, Dot product and Identity matrix

Linear discriminant analysis

Intuitively, the idea of LDA is to find a projection where class separation is maximized. Given two sets of labeled data, C1 and C2, we can calculate the mean value of each class, m1 and m2, as

mi=1li∑n=1lixni,

where li is the number of examples of class Ci. The goal of linear discriminant analysis is to give a large separation of the class means while also keeping the in-class variance small. This is formulated as maximizing, with respect to w, the following ratio:

J(w)=wTSBwwTSWw,

where SB is the between-class covariance matrix and SW is the total within-class covariance matrix:

SB=(m2−m1)(m2−m1)TSW=∑i=1,2∑n=1li(xni−mi)(xni−mi)T.

The maximum of the above ratio is attained at

w∝SW−1(m2−m1).

as can be shown by the Lagrange multiplier method (sketch of proof):

Maximizing J(w)=wTSBwwTSWw is equivalent to maximizing

wTSBw

subject to

wTSWw=1.

This, in turn, is equivalent to maximizing I(w,λ)=wTSBw−λ(wTSWw−1), where λ is the Lagrange multiplier.

At the maximum, the derivatives of I(w,λ) with respect to w and λ must be zero. Taking dIdw=0 yields

SBw−λSWw=0,

which is trivially satisfied by w=cSW−1(m2−m1) and λ=(m2−m1)TSW−1(m2−m1).

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Statistics