Annotates the results of calling
runTests with different kinds of performance measures.
An object of class
Further arguments that may be used by
Most performance metrics are provided by ROCR, so only work for two-class datasets. If
runTests was run in resampling mode, one performance measure is produced
for every resampling. If the leave-out mode was used, then the predictions are
concatenated, and one performance measure is calcuated for all classifications.
A variety of other metrics are also implemented in ClassifyR and are suitable for evaluating
a multi-class classification.
"balanced" calculates the balanced error rate
and is better suited to class-imbalanced datasets than the ordinary error rate.
"sample error" calculates the error rate of each sample individually. This may help to identify
which samples are contributing the most to the error rate.
"sample accuracy" causes
the sample-wise accuracy to be computed.
ClassifyResult object, with new information in the
1 2 3 4 5 6 7 8 9
predictTable <- data.frame(sample = 1:10, label = factor(sample(LETTERS[1:2], 50, replace = TRUE))) actual <- factor(sample(LETTERS[1:2], 10, replace = TRUE)) result <- ClassifyResult("Example", "Differential Expression", "A Selection", paste("A", 1:10, sep = ''), paste("Gene", 1:50, sep = ''), list(1:50, 1:50), list(1:5, 6:15), list(predictTable), actual, list("leave", 2)) result <- calcPerformance(result, "balanced") performance(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.