Learn R Programming

backShift (version 0.1.4.3)

metricsThreshold: Performance metrics for estimate of connectiviy matrix A.

Description

Computes various performance metrics for estimate of connectiviy matrix A.

Usage

metricsThreshold(trueA, est, thres = seq(0.01, 1, by = 0.01))

Arguments

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.

Value

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

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab