Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.