[R] a question on lda{MASS}

Weiwei Shi helprhelp at gmail.com
Fri Aug 10 00:33:14 CEST 2007


hi,

assume
val is the test data while m is lda model value by using CV=F

x = predict(m, val)

val2 = val[, 1:(ncol(val)-1)] # the last column is class label

# col is sample, row is variable

then I am wondering if

x$x == (apply(val2*m$scaling), 2, sum)

i.e., the scaling (is it coeff vector?) times val data and sum is the
discrimant result $x?

Thanks.

-- 
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.

"Did you always know?"
"No, I did not. But I believed..."
---Matrix III



More information about the R-help mailing list