Professional Documents
Culture Documents
Linear Direction Analys
Linear Direction Analys
Lecture 8
Today
Continue with Dimensionality Reduction
Last lecture: PCA
This lecture: Fisher Linear Discriminant
apply PCA
not separable
to each class
txi
n1
n1
1
1
v t xi = v t
x i = v t 1
~1 =
n1 x i C 1
n1 x i C 1
similarly ,
~ 2 = v t 2
~1
~2
1
small variance
1
2
~2
1
large variance
i =1
(z i
z )
smaller scatter:
~1 ~2 by scatter
2
i
2
y i Class 2
(
~1 ~2 )2
J (v ) = ~ 2 ~ 2
s1 + s2
(
~1 ~2 )2
J (v ) = ~ 2 ~ 2
s1 + s 2
~1
~ implies that
small s
1
projected samples of
class 1 are clustered
around projected mean
~2
~ implies that
small s
2
projected samples of
class 2 are clustered
around projected mean
(
~1 ~2 )2
J (v ) = ~ 2 ~ 2
s1 + s2
(x i
1 )( x i 1 )
(x i
2 )( x i 2 )
x i Class 1
x i Class 2
Recall that
(y i
s~12 =
y i Class 1
~1 ) 2
t
Using yi = vtxi and ~1 = v 1
~2 =
s
1
=
(v x v )
(v (x )) (v (x
t
y i Class 1
((x
y i Class 1
y i Class 1
y i Class 1
1 ) v
t
(x i
) ((x
t
1 ))
1 ) v
t
1 )( x i 1 ) v = v t S 1v
t
Similarly
d t
d t
t
v SW v v t S B v
v S B v v SW v
dv
dv
(v
SW v )
(2 S B v )v t SW v (2 SW v )v t S B v
(v
SW v )
=0
v t S W v (S B v ) v t S B v (S W v ) = 0
v t S W v (S B v ) v t S B v (S W v )
=0
t
t
v SW v
v SW v
v t S B v (S W v )
SBv
=0
t
v SW v =
S B v = SW v
generalized eigenvalue problem
direction as 1 - 2
t
S B x = ( 1 2 )( 1 2 ) x = ( 1 2 )(( 1 2 )t x ) = ( 1 2 )
Thus can solve the eigenvalue problem immediately
v = S W 1 ( 1 2 )
1
W
S SB
[S (
1
W
1
1
[
=
S
)
(
)
]
[
]
= SW 1 2
W ( 1 2 )]
1 2
1 2
5 5
c2 =
1 0
6 5
2]
cov
c
=
S 1 = 4 cov (c 1 ) = 810
2
2
16 16
.0 7 .2
Within the class scatter:
. 3 24
S W = S 1 + S 2 = 27
24 23 . 2
0 . 41
The inverse of SW is S W 1 = inv (S W ) = 00. 39
. 41 0 . 47
Finally, the optimal line direction v
. 79
v = S W 1 ( 1 2 ) = 00. 89
5 = [0 . 81
5
6 = [ 0 . 65
5
0 .4 ]
0 . 25 ]
ni
= 1
x class i
xi
xi
det (V t S BV )
Objective function: J (V ) =
det (V t S W V )
within the class scatter matrix SW is
SW =
i =1
Si =
(x k
i = 1 x k class i
i )( x k i )
SB =
i =1
n i ( i )( i )
maximum rank is c -1
Will fail:
fails:
PCA also