score {supclust} | R Documentation |
For a set of n
observations grouped into two classes (for
example n
expression values of a gene), the score
function measures the separation of the classes. It can be interpreted
as counting for each observation having response zero, the number of
individuals of response class one that are smaller, and summing up
these quantities.
score(x, resp)
x |
Numeric vector of length |
resp |
Numeric vector of length |
A numeric value, the score
. The minimal score
is
zero, the maximal score
is the product of the number of samples
in class 0 and class 1. Values near the minimal or maximal
score
indicate good separation, whereas intermediate
score
means poor separation.
Marcel Dettling, dettling@stat.math.ethz.ch
wilma
also for references;
margin
is the second statistic that is used there.
data(leukemia, package="supclust")
op <- par(mfrow=c(1,3))
plot(leukemia.x[,69],leukemia.y)
title(paste("Score = ", score(leukemia.x[,69], leukemia.y)))
## Sign-flipping is very important
plot(leukemia.x[,161],leukemia.y)
title(paste("Score = ", score(leukemia.x[,161], leukemia.y),2))
x <- sign.flip(leukemia.x, leukemia.y)$flipped.matrix
plot(x[,161],leukemia.y)
title(paste("Score = ", score(x[,161], leukemia.y),2))
par(op)