| scores {networkBMA} | R Documentation |
Gives scores for assessment and other values associated with contingency tables for network inference.
scores( contabs, what = c("TP", "FN", "FP", "TN",
"TPR", "TNR", "FPR", "FDR", "PPV", "NPV",
"sensitivity", "specificity", "precision", "recall",
"F1", "MCC", "ACC", "expected", "O/E"))
contabs |
A data frame representing a contingency tables (confusion matrices) for
a binary classification experiment. The column names should include
|
what |
A character string specifying one or more desired output quantities from among:
|
A data frame in which the variables are the desired quantities derived
the specified contingency tables. The rows correspond to the rows
of the contingency tables supplied as input (contabs).
data(dream4)
network <- 1
reference <- dream4gold10[[network]]
nGenes <- length(unique(c(reference[,1],reference[,2])))
nPossibleEdges <- nGenes^2
reference <- reference[reference[,3] == 1,1:2]
nTimePoints <- length(unique(dream4ts10[[network]]$time))
edges1ts10 <- networkBMA( data = dream4ts10[[network]][,-(1:2)],
nTimePoints = nTimePoints, prior.prob = 0.1,
self = FALSE)
size <- nPossibleEdges - nGenes
contingencyTables <- contabs(network = edges1ts10, reference = reference,
size = size)
scores(contingencyTables, what = c("sensitivity", "specificity", "FDR"))