Description Usage Arguments Details Value Examples
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.
1 | get_performance(strength, ground_truth, consider_direction = TRUE)
|
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. |
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.
A table containing the from and to nodes, a prediction score, and a label indicating presence in the reference graph.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.