[R] feature's contribution into classification

Weiwei Shi helprhelp at gmail.com
Mon Aug 13 17:37:14 CEST 2007

Hi, there:

The following question is more of statistics:

assume i have 5 features in a classification, and I am wondering which
methodology can help me identify which feature "contributes" the most
to classify a specific sample?

I knew some simple modeling like logistic regression probably can do
it since it provides an explicit formulae for that. Any others?

I tried to use lda{MASS} and posted the question last week but I did
not get any response. So again, I re-phrase my question.



My previous questions are also attached for reference.


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.



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?

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