Description Usage Arguments Value Examples
Computes various performance metrics for estimate of connectiviy matrix A.
1 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.