metricsThreshold: Performance metrics for estimate of connectiviy matrix A.

Description Usage Arguments Value Examples

View source: R/metrics.R

Description

Computes various performance metrics for estimate of connectiviy matrix A.

Usage

1
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:

Examples

 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)

backShift documentation built on July 2, 2020, 4:01 a.m.