Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to implement multiclass LDA (Fisher) ?
Replies: 7   Last Post: Jun 18, 2013 12:10 PM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 214 Registered: 12/13/04
Re: How to implement multiclass LDA (Fisher) ?
Posted: Jun 11, 2012 11:16 AM

On Jun 9, 12:41 pm, "Chaou " <chaouahmedkha...@gmail.com> wrote:
> Thank you Greg for your response.
>
> But I do not understand how you campute covarience Sb and Sw without loops.
>
> You say to compute Sw, I just need to run :
>
> s1  = (N1-1)*cov(CLASS1);
> etc....
> and then do Sw=s1+s2+s3;
>
> But how should I do to compute Sb without loops ? I don't know.....

[ I N1 ] = size(CLASS1)
m1 = mean(CLASS1,2)
sw1 = (N-1)*cov(CLASS1)
etc

N0 = N1 + etc
m0 = ( N1*m1 + etc )/N0
sb1 = N1*( m1 - m0 )*( m1 - m0)'
etc

Sw = sw1 + etc
Sb = sb1 + etc

Hope this helps.

Greg

Date Subject Author
6/5/12 Chaou
6/8/12 Chaou
6/8/12 Greg Heath
6/9/12 Chaou
6/11/12 Greg Heath
6/11/12 Greg Heath
6/18/13 Jing Wang
6/10/12 Greg Heath