plot_prcurve | R Documentation |
Create a precision/recall curve using metrics computed by the svevalOl
function.
The svevalOl
function returns a list containing a "curve" data.frame with the
evaluation metrics for different quality thresholds.
plot_prcurve(eval, labels = NULL)
eval |
a data.frame, a list of data.frames, or a vector with one or several paths to files with "curve" information. |
labels |
the labels to use for each input (when multiple inputs are used). Ignored is NULL (default). |
If the input is a data.frame (or list of data.frames) it should be the "curve" element
of the list returned by the svevalOl
function. If the input is a character (or
a vector of characters), they are considered to be file names and the data will be read
from these files.
If multiple inputs are given, either using a list of data.frames or a vectors with several filenames, one curve per input will be created. This is to be used to quickly compare several methods. The "labels" parameters can be used to specify a label for each input to use for the graphs.
list of ggplot graph objects
Jean Monlong
## Not run:
eval = svevalOl('calls.vcf', 'truth.vcf')
plot_prcurve(eval$curve)
# Comparing multiple methods
eval.1 = svevalOl('calls1.vcf', 'truth.vcf')
eval.2 = svevalOl('calls2.vcf', 'truth.vcf')
plot_prcurve(list(eval.1$curve, eval.2$curve), labels=c('method1', 'method2'))
# Or if the results were previously written in files
plot_prcurve(c('methods1-prcurve.tsv', 'methods2-prcurve.tsv'), labels=c('method1', 'method2'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.