Description Usage Arguments Details Value Author(s) Examples
Uses an ordinary t-test if the data set has two classes or one-way ANOVA if the data set has three or more classes to select differentially expressed features.
1 2 3 4 5 6 7 8 | ## S4 method for signature 'matrix'
differentMeansSelection(measurements, classes, ...)
## S4 method for signature 'DataFrame'
differentMeansSelection(measurements, classes, datasetName,
trainParams, predictParams, resubstituteParams,
selectionName = "Difference in Means", verbose = 3)
## S4 method for signature 'MultiAssayExperiment'
differentMeansSelection(measurements, targets = NULL, ...)
|
measurements |
Either a |
classes |
A vector of class labels of class |
targets |
Names of data tables to be combined into a single table and used in the analysis. |
... |
Variables not used by the |
datasetName |
A name for the data set used. Stored in the result. |
trainParams |
A container of class |
predictParams |
A container of class |
resubstituteParams |
An object of class |
selectionName |
A name to identify this selection method by. Stored in the result. |
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. |
This selection method looks for changes in means and uses rowttests
to rank the features if there are two classes or rowFtests
if there are three or more classes. The choice of features is based on the best resubstitution performance.
An object of class SelectResult
or a list of such objects, if the classifier
which was used for determining the specified performance metric made a number of prediction varieties.
Dario Strbenac
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #if(require(sparsediscrim))
#{
# Genes 76 to 100 have differential expression.
genesMatrix <- sapply(1:25, function(sample) c(rnorm(100, 9, 2)))
genesMatrix <- cbind(genesMatrix, sapply(1:25, function(sample)
c(rnorm(75, 9, 2), rnorm(25, 14, 2))))
classes <- factor(rep(c("Poor", "Good"), each = 25))
colnames(genesMatrix) <- paste("Sample", 1:ncol(genesMatrix))
rownames(genesMatrix) <- paste("Gene", 1:nrow(genesMatrix))
resubstituteParams <- ResubstituteParams(nFeatures = seq(10, 100, 10),
performanceType = "balanced error", better = "lower")
selected <- differentMeansSelection(genesMatrix, classes, "Example",
trainParams = TrainParams(), predictParams = PredictParams(),
resubstituteParams = resubstituteParams)
selected@chosenFeatures
#}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.