gen_roc_curve: Generate receiver operating characteristic curve

Description Usage Arguments Value Examples

View source: R/rlib_roc_pr.R

Description

Given the set of true signals and the set of candidate genes along with their scores and proposing method, generate ROC curve, which is a sequence of FPR and TPR measured at a set of cutoffs

Usage

1
gen_roc_curve(true_genes, gene, score, method = "gt", cutoff = NULL)

Arguments

true_genes

the set of true signals

gene

the set of all candidate signals

score

the scores of the candidates (the same length as gene)

method

method = 'gt' to propose score greater than threshold; method = 'lt' to propose score less than threshold

cutoff

cutoff = NULL will use all unique scores from true signals as cutoffs (essentially this is the finest grid we can get)

Value

a data.frame with all columns of compute_tpr_and_fpr's output along with cutoff column telling which cutoff is used to obtain the results of the row

Examples

1
2
3
4
5
6
7
gen_roc_curve(
  true_genes = c('g1', 'g3', 'g4'),
  gene = c('g1', 'g2', 'g3', 'g4', 'g5', 'g6'),
  score = 1:6,
  method = 'gt',
  cutoff = NULL
)

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