compute_tpr_and_fpr: Calculate TPR and FPR

Description Usage Arguments Value Examples

View source: R/rlib_roc_pr.R

Description

Given the set of all candidate genes, true signals, and proposed signals as three separate sets, calculate true positive rate (TPR) and false positive rate (FPR)

Usage

1
compute_tpr_and_fpr(tested_genes, discovered_genes, true_genes)

Arguments

tested_genes

a set of candidate genes (their IDs as string; it should include both discovered_genes and true_genes)

discovered_genes

a set of proposed signals (their IDs as string)

true_genes

a set of true signals (their IDs as string)

Value

data.frame with tpr and fpr as columns along with nTP (number of true positives), nT (number of true signals), nFP (number of false positives, i.e. proposed but not true signals), and nTP (number of proposed and true signals)

Examples

1
2
3
4
5
compute_tpr_and_fpr(
  tested_genes = c('g1', 'g2', 'g3', 'g4', 'g5', 'g6'),
  discovered_genes = c('g1', 'g3', 'g4'),
  true_genes = c('g1', 'g2')
)

liangyy/silver-standard-performance documentation built on Dec. 5, 2019, 8:53 a.m.