Description Usage Arguments Details Value Author(s) See Also Examples
Restructures variables from ClassifyR framework to be compatible with pamr.listgenes
definition.
1 2 3 4 5 6 7 | ## S4 method for signature 'matrix'
NSCselectionInterface(measurements, classes, ...)
## S4 method for signature 'DataFrame'
NSCselectionInterface(measurements, classes, datasetName,
trained, ..., selectionName = "Shrunken Centroids", verbose = 3)
## S4 method for signature 'MultiAssayExperiment'
NSCselectionInterface(measurements, targets = names(measurements), ...)
|
measurements |
Either a |
classes |
Either a vector of class labels of class |
targets |
If |
datasetName |
A name for the data set used. Stored in the result. |
trained |
The output of |
... |
Variables not used by the |
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 function is an interface between the ClassifyR framework and pamr.listgenes
.
The set of features chosen is the obtained by considering the range of thresholds provided to NSCtrainInterface
and using the threshold that obtains the lowest cross-validation error rate on the training set.
An object of class SelectResult
. The rankedFeatures
slot will be empty.
Dario Strbenac
pamr.listgenes
for the function that was interfaced to.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if(require(pamr))
{
# Genes 76 to 100 have differential expression.
genesMatrix <- sapply(1:25, function(geneColumn) c(rnorm(100, 9, 1)))
genesMatrix <- cbind(genesMatrix, sapply(1:25, function(geneColumn)
c(rnorm(75, 9, 1), rnorm(25, 14, 1))))
rownames(genesMatrix) <- paste("Gene", 1:nrow(genesMatrix))
classes <- factor(rep(c("Poor", "Good"), each = 25))
trained <- NSCtrainInterface(genesMatrix, classes)
selected <- NSCselectionInterface(genesMatrix, classes, "Example", trained)
selected@chosenFeatures
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.