
Last chance! 50% off unlimited learning
Sale ends in
"fisherDiscriminant"(expression, classes, ...) "fisherDiscriminant"(expression, test, returnType = c("label", "score", "both"), verbose = 3)
matrix
or ExpressionSet
containing
the training data. For a matrix, the rows are features, and the columns
are samples.matrix
method passed to the
ExpressionSet
method.matrix
or ExpressionSet
containing
the test data."label"
, "score"
, or "both"
. Sets the return value
from the prediction to either a vector of class labels, score for a sample belonging
to the second class, as determined by the factor levels, or both labels and scores
in a data.frame
.data.frame
of class prediction information, as long as the number of samples in the test data.
trainMatrix <- matrix(rnorm(1000, 8, 2), ncol = 10)
trainMatrix[1:30, 1:5] <- trainMatrix[1:30, 1:5] + 5 # Make first 30 genes D.E.
testMatrix <- matrix(rnorm(1000, 8, 2), ncol = 10)
testMatrix[1:30, 6:10] <- testMatrix[1:30, 6:10] + 5 # Make first 30 genes D.E.
classes <- factor(rep(c("Poor", "Good"), each = 5))
fisherDiscriminant(trainMatrix, classes, testMatrix)
Run the code above in your browser using DataLab