comparePredAdjMatrix2TrueAdjMat {BiCausality} | R Documentation |
comparePredAdjMatrix2TrueAdjMat
Description
comparePredAdjMatrix2TrueAdjMat is a support function that can compare two adjacency matrices: ground-truth and inferred matrices.
Usage
comparePredAdjMatrix2TrueAdjMat(trueAdjMat, adjMat)
Arguments
trueAdjMat |
a ground-truth matrix. |
adjMat |
an inferred matrix. |
Value
This function returns a list of precision prec
, recall rec
, and F1 score F1
of inferred vs. groundtruth matrices.
Examples
# Generate simulation data
G<-matrix(FALSE,10,10) # groundtruth
G[1,c(4,7,8,10)]<-TRUE
G[2,c(5,7,9,10)]<-TRUE
G[3,c(6,8,9,10)]<-TRUE
comparePredAdjMatrix2TrueAdjMat(trueAdjMat=G,adjMat=G)
[Package BiCausality version 0.1.4 Index]