Description Usage Arguments Details Value Author(s) See Also Examples
Restructures variables from ClassifyR framework to be compatible with pamr.predict
definition.
1 2 3 4 5 6 | ## S4 method for signature 'pamrtrained,matrix'
NSCpredictInterface(trained, test, ...)
## S4 method for signature 'pamrtrained,DataFrame'
NSCpredictInterface(trained, test, classes = NULL, ..., returnType = c("class", "score", "both"), verbose = 3)
## S4 method for signature 'pamrtrained,MultiAssayExperiment'
NSCpredictInterface(trained, test, targets = names(test), ...)
|
trained |
An object of class |
test |
An object of the same class as |
classes |
Either NULL or a character vector of length 1, specifying the column name to remove. |
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. |
This function is an interface between the ClassifyR framework and pamr.predict
.
It selects the highest threshold that gives the minimum error rate in the training data.
Either a factor vector of predicted classes, a matrix of scores for each class, or a table of
both the class labels and class scores, depending on the setting of returnType
.
Dario Strbenac
pamr.predict
for the function that was interfaced to.
1 2 3 4 5 6 7 8 9 10 11 | if(require(pamr))
{
# Samples in one class with differential expression to other class.
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))))
classes <- factor(rep(c("Poor", "Good"), each = 25))
fit <- NSCtrainInterface(genesMatrix[, c(1:20, 26:45)], classes[c(1:20, 26:45)])
NSCpredictInterface(fit, genesMatrix[, c(21:25, 46:50)])
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.