Description Usage Arguments Details Value Author(s) Examples
Finds the decision boundary using the training set, and gives predictions for the test set.
1 2 3 4 5 6 7 | ## S4 method for signature 'matrix'
fisherDiscriminant(measurements, classes, test, ...)
## S4 method for signature 'DataFrame'
fisherDiscriminant(measurements, classes, test, returnType = c("class", "score", "both"),
verbose = 3)
## S4 method for signature 'MultiAssayExperiment'
fisherDiscriminant(measurements, test, targets = names(measurements), ...)
|
measurements |
Either a |
classes |
Either a vector of class labels of class |
test |
An object of the same class as |
targets |
If |
... |
Variables not used by the |
returnType |
Default: |
verbose |
Default: 3. A number between 0 and 3 for the amount of progress messages to give. This function only prints progress messages if the value is 3. |
Unlike ordinary LDA, Fisher's version does not have assumptions about the normality of the features.
Data tables which consist entirely of non-numeric data cannot be analysed. If measurements
is an object of class MultiAssayExperiment, the factor of sample classes must be stored
in the DataFrame accessible by the colData function with column name "class".
A vector or data.frame of class prediction information, as long as the number of samples in the test data.
Dario Strbenac
1 2 3 4 5 6 7 8 9 10 11 12 | trainMatrix <- matrix(rnorm(1000, 8, 2), ncol = 10)
classes <- factor(rep(c("Poor", "Good"), each = 5))
# Make first 30 genes increased in value for poor samples.
trainMatrix[1:30, 1:5] <- trainMatrix[1:30, 1:5] + 5
testMatrix <- matrix(rnorm(1000, 8, 2), ncol = 10)
# Make first 30 genes increased in value for sixth to tenth samples.
testMatrix[1:30, 6:10] <- testMatrix[1:30, 6:10] + 5
fisherDiscriminant(trainMatrix, classes, testMatrix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.