runTest | R Documentation |
For a data set of features and samples, the classification process is run. It consists of data transformation, feature selection, classifier training and testing.
## S4 method for signature 'matrix'
runTest(measurementsTrain, outcomeTrain, measurementsTest, outcomeTest, ...)
## S4 method for signature 'DataFrame'
runTest(
measurementsTrain,
outcomeTrain,
measurementsTest,
outcomeTest,
crossValParams = CrossValParams(),
modellingParams = ModellingParams(),
characteristics = S4Vectors::DataFrame(),
...,
verbose = 1,
.iteration = NULL
)
## S4 method for signature 'MultiAssayExperiment'
runTest(measurementsTrain, measurementsTest, outcomeColumns, ...)
measurementsTrain |
Either a |
... |
Variables not used by the |
outcomeTrain |
Either a factor vector of classes, a |
measurementsTest |
Same data type as |
outcomeTest |
Same data type as |
crossValParams |
An object of class |
modellingParams |
An object of class |
characteristics |
A |
verbose |
Default: 1. A number between 0 and 3 for the amount of progress messages to give. A higher number will produce more messages as more lower-level functions print messages. |
.iteration |
Not to be set by a user. This value is used to keep track
of the cross-validation iteration, if called by |
outcomeColumns |
If |
This function only performs one classification and prediction. See
runTests
for a driver function that enables a number of
different cross-validation schemes to be applied and uses this function to
perform each iteration.
If called directly by the user rather than being used internally by
runTests
, a ClassifyResult
object. Otherwise a
list of different aspects of the result which is passed back to runTests
.
Dario Strbenac
#if(require(sparsediscrim))
#{
data(asthma)
tuneList <- list(nFeatures = seq(5, 25, 5), performanceType = "Balanced Error")
selectParams <- SelectParams("limma", tuneParams = tuneList)
modellingParams <- ModellingParams(selectParams = selectParams)
trainIndices <- seq(1, nrow(measurements), 2)
testIndices <- seq(2, nrow(measurements), 2)
runTest(measurements[trainIndices, ], classes[trainIndices],
measurements[testIndices, ], classes[testIndices], modellingParams = modellingParams)
#}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.