Description Usage Arguments Details Value References See Also Examples
Computes the Receiver Operating Characteristic (ROC) or precisionrecall curves from contingencies tables (confusion matrices) and their associated probabilities, and optionally plots them.
1 2 
contabs 
A data frame representing a contingency tables (confusion matrices) for
a binary classification experiment. The column names should include

plotit 
A logical variable indicating whether or not the ROC curve should be plotted. 
ymax 
Upper vertical axis value for plotting precisionrecall curves with

The estimated area may be inaccurate when the sector covered by the contingency tables is small, and should be used with caution in such cases.
A vector with the following named components:
area 
The area under the extended curve (covered by the black solid and dotted lines). 
sector 
The estimated area under the sector (below the curve and within the red lines) covered by the contingency table. 
width 
The width of the sector (within the red vertical lines) covered by the contingency table. 
As a sideeffect, the ROC (roc
) or precisionrecall curve
(prc
) is plotted if plotit = TRUE
.
The red vertical lines highlight the sector covered
by the contingency table.
The black lines approximate the curve. They are dotted
beyond the endpoints of the sector, where there is no information
from the contingency table.
The diagonal blue line in the ROC curve indicates the line between (0,0)
and (1,1).
J. Davis and M. Goadrich, The relationship between PrecisionRecall and ROC curves, manuscript, Department of Computer Science, University of Wisconsin.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  data(dream4)
network < 1
nTimePoints < length(unique(dream4ts10[[network]]$time))
edges1ts10 < networkBMA( data = dream4ts10[[network]][,(1:2)],
nTimePoints = nTimePoints, prior.prob = 0.1)
# check for self loops in estimated network
selfN < any(as.character(edges1ts10[,1]) == as.character(edges1ts10[,2]))
selfN
reference < dream4gold10[[network]]
# check for self loops in reference (there are none)
selfR < any(as.character(reference[,1]) == as.character(reference[,2]))
selfR
# restrict reference to edges; first two columns (gene) only
reference < reference[reference[,3] == 1,1:2]
contingencyTables < contabs(network = edges1ts10, reference = reference,
size = 100)
roc(contingencyTables)
prc(contingencyTables)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.