gen_fdr_power_curve: Generate precision-recall 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 precision-recall curve, which is a sequence of precision and recall measured at a set of cutoffs

Usage

1
gen_fdr_power_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_power_and_fdr's output along with cutoff column telling which cutoff is used to obtain the results of the row and precision (same as 1 - fdr) and recall (same as power)

Examples

1
2
3
4
5
6
7
gen_fdr_power_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.