calcPerformance: Add Performance Calculations to a ClassifyResult object

Description Usage Arguments Details Value Author(s) Examples

Description

Annotates the results of calling runTests with different kinds of performance measures.

Usage

1
2
  ## S4 method for signature 'ClassifyResult'
calcPerformance(result, performanceType, ...)

Arguments

result

An object of class ClassifyResult.

performanceType

Either "balanced" or one of the options provided by performance.

...

Further arguments that may be used by performance.

Details

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 predictions.

Because ROCR only provides calculations for two-class classification, this function is only suitable for two-class classification performance measures.

Value

An updated ClassifyResult object, with new information in the performance slot.

Author(s)

Dario Strbenac

Examples

1
2
3
4
5
6
7
8
9
  predictTable <- data.frame(sample = 1:5,
                             label = factor(sample(LETTERS[1:2], 50, replace = TRUE)))
  actual <- factor(sample(LETTERS[1:2], 50, replace = TRUE))                             
  result <- ClassifyResult("Example", "Differential Expression", "A Selection",
                           paste("A", 1:10, sep = ''), paste("Gene", 1:50, sep = ''),
                           list(1:100, 1:100), list(1:5, 6:15),
                           list(predictTable), actual, list("leave", 2))
  result <- calcPerformance(result, "balanced") 
  performance(result)


Search within the ClassifyR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.