get_performance: Performance predictions and labels for structure inference...

Description Usage Arguments Details Value Examples

Description

Compares model averaging results in Bayesian network structure inference to a ground truth network and obtains a table of predictions and labels for the presence of edges.

Usage

1
get_performance(strength, ground_truth, consider_direction = TRUE)

Arguments

strength

model averaging resuts, an object of class bn.strength. See ?bn.strength.

true

An object of class bn representing the ground truth network.

directed_edges

boolean that defaults to TRUE. TRUE if you want to evaluate to recovery of directed edges, FALSE for the recovery of undirected.

Details

Note: this looks at performance at the edge level, not the network level. A DAG assembled from model averaging results frequently requires removal of some high scoring edges to avoid creation of cycles. By focusing purely on edge discovery, that constraint is avoided.

In causal network inference edge direction has a causal interpretation, but generally edges do not reflect causality, just conditional dependence relationships. By setting the directed_edges argument to FALSE, prediction values for undirected edges are calculated. This enables evaluation of performance of recovery of conditional dependence relationships, and may be more informative than direct edge recovery if the network inference doesn't meet the assumptions of causal inference.

Value

A table containing the from and to nodes, a prediction score, and a label indicating presence in the reference graph.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
net <- simGaussianNet(8)
net_structure <- bn.net(net)
sim_data <- rbn(net, 1000)
ma_results <- boot.strength(sim_data, R = 100, m = 1000, algorithm = "tabu",
                           algorithm.args = list(score = "bic-g"))
output <- get_performance(net_structure, ma_results)
library(ROCR)
output %$%
   prediction %>%
   performance("tpr", "fpr") %>%
   plot

robertness/bninfo documentation built on May 27, 2019, 10:32 a.m.