[R] Actual code for LDA

ben1983 ben_thompson at talk21.com
Wed Feb 12 15:55:59 CET 2014

Hi All,
        I've been trying to write my own code for LDA (linear discrim) so I
can modify it to be weighted LDA since some of my groups are outliers. 

However, the code I write for standard LDA gives me slightly different
results to those from R (slightly different LDAs.....and not just scalar

Does R simply invert the pooled within groups scatter matrix e.g. solve(Sw)
and multiply it by the between groups scatter Sb, then take the eigen

This is the approach that I use, yet get slightly different
results..........does R by default use a slightly more robust inverse or
estimate of Sw?? 

I've looked at the source code, and I find it very hard to follow. 

If anyone has any ideas that would be great!!

View this message in context: http://r.789695.n4.nabble.com/Actual-code-for-LDA-tp4685194.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list