
Last chance! 50% off unlimited learning
Sale ends in
roc( contabs, plotit = TRUE)
prc( contabs, plotit = TRUE, ymax = max(y))
TP
(for true positive), FN
(for false negative),
FP
(for false positive), TN
(for true negative);
these can be given in any order.
prc
. The default is max(y)
, (the maximum value for
precision derived from the contingency table). ymax
should be
no larger than 1.
roc
) or precision-recall 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).
contabs
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)
Run the code above in your browser using DataLab