metricsThreshold {backShift} | R Documentation |
Computes various performance metrics for estimate of connectiviy matrix A.
metricsThreshold(trueA, est, thres = seq(0.01, 1, by = 0.01))
trueA |
True connectivity matrix |
est |
Estimated connectivity matrix |
thres |
Value at which the point estimate should be thresholded, i.e. edges with coefficients smaller than thres are discarded. Can be a sequence of values. |
A data frame with the following columns:
Threshold
Value at which point estimate est
was thresholded.
SHD
Structural Hamming distance between trueA
and est
.
TPR.Recall
True positive rate / recall value
FPR
False positive rate
Precision
Precision value
# true A p <- 3 A <- diag(p)*0 A[1,2] <- 0.8 A[2,3] <- -0.8 A[3,1] <- 0.8 # say an estimated connectivity matrix is given by: A.est <- matrix(rnorm(p*p, 1e-3, 1e-3), ncol = p) diag(A.est) <- 0 A.est[1,2] <- 0.76 A.est[2,3] <- -0.68 A.est[3,1] <- 0.83 # compute metrics with threshold 0.25 metricsThreshold(A, A.est, thres = 0.25)