conf.mat {BDgraph} | R Documentation |
Confusion Matrix
Description
Create a Confusion Matrix.
Usage
conf.mat( pred, actual, cutoff = 0.5, proportion = FALSE,
dnn = c( "Prediction", "Actual" ), ... )
Arguments
pred |
adjacency matrix corresponding to an estimated graph.
It can be an object with |
actual |
adjacency matrix corresponding to the actual graph structure in which |
cutoff |
cutoff value for the case that |
proportion |
logical: FALSE (default) for a confusion matrix with number of cases. TRUE, for a confusion matrix with the proportion of cases. |
dnn |
names to be given to the dimensions in the result (the dimnames names). |
... |
further arguments to be passed to |
Value
the results of table
on pred
and actual
.
Author(s)
Reza Mohammadi a.mohammadi@uva.nl
See Also
conf.mat.plot
, compare
, roc
, bdgraph
Examples
## Not run:
set.seed( 100 )
# Generating multivariate normal data from a 'random' graph
data.sim <- bdgraph.sim( n = 50, p = 6, size = 7, vis = TRUE )
# Running sampling algorithm based on GGMs
sample.ggm <- bdgraph( data = data.sim, method = "ggm", iter = 10000 )
# Confusion Matrix for GGM method
conf.mat( pred = sample.ggm, actual = data.sim )
## End(Not run)