R/misc.R

Defines functions perform_metrics

perform_metrics <- function(graph_hat,graph){
    normOmega <- norm(graph_hat-graph, type = "I")
    normSigma <- norm(solve(graph_hat)-solve(graph), type = "I")
    graph <- graph != 0
    graph_hat <- graph_hat != 0
    FP <- sum(graph_hat[upper.tri(graph_hat)] & !graph[upper.tri(!graph)])
    FN <- sum(!graph_hat[upper.tri(!graph_hat)] & graph[upper.tri(graph)])
    return(c(normOmega,normSigma,FP,FN))
}

Try the robustcov package in your browser

Any scripts or data that you put into this service are public.

robustcov documentation built on Aug. 4, 2021, 5:07 p.m.