[R] a question on lda{MASS}
Weiwei Shi
helprhelp at gmail.com
Fri Aug 10 17:37:30 CEST 2007
hi,
maybe I should re-phrase my question a bit:
is there a way to get explicit formulae like Y ~ sum of CiXi from the
model build by lda{MASS} to calculate $x (value) ?
I assume scaling is the coeff and Xi is from test data and Y is $x
called LD1. But I want to confirm this.
Thanks.
Weiwei
On 8/9/07, Weiwei Shi <helprhelp at gmail.com> wrote:
> 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
>
--
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