numTP: Number of True Positives for a given proportion of False...

Description Usage Arguments Value Author(s) See Also Examples

Description

Often when evaluating a differential expression method, we are interested in how well a classifier performs for very small numbers of true positives. This method gives one way of calculating this, by determining the number of true positives for a set proportion of false positives.

Usage

1
numTP(scores, truthValues, FPRate = 0.5)

Arguments

scores

A vector of scores. This could be, e.g. one of the columns of the statistics of a DEResult object.

truthValues

A boolean vector indicating which scores are True Positives.

FPRate

A number between 0 and 1 identify the proportion of flase positives for which we wish to determine the number of true positives.

Value

An integer giving the number of true positives.

Author(s)

Richard D. Pearson

See Also

Related methods numFP, plotROC and calcAUC.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if(FALSE){
class1a <- rnorm(1000,0.2,0.1)
class2a <- rnorm(1000,0.6,0.2)
class1b <- rnorm(1000,0.3,0.1)
class2b <- rnorm(1000,0.5,0.2)
scores_a <- c(class1a, class2a)
scores_b <- c(class1b, class2b)
classElts <- c(rep(FALSE,1000), rep(TRUE,1000))
print(numTP(scores_a, classElts))
print(numTP(scores_b, classElts))
}

puma documentation built on Nov. 8, 2020, 11:08 p.m.