# strength of the arcs present in x.
arc.strength(x, data, criterion = NULL, ..., debug = FALSE)
# strength of all possible arcs, as learned from bootstrapped data.
boot.strength(data, cluster = NULL, R = 200, m = nrow(data),
algorithm, algorithm.args = list(), cpdag = TRUE, debug = FALSE)
# strength of all possible arcs, from a list of custom networks.
custom.strength(networks, nodes, weights = NULL, cpdag = TRUE, debug = FALSE)# averaged network structure.
averaged.network(strength, nodes, threshold)
bn.bn
or arc sets (matrices or data frames with two columns, optionally
labeled "from" and "to").parallel integration for details and a simple
example.bn.strength, see below.threshold attribute of the strength argument.averaged.network, it defaults to
the set of the unique node labels in the strength argument.bnlearn-package
for details.NULL, weights are assumed to be
uniform.TRUE the (PDAG of) the
equivalence class is used instead of the network structure
itself. It should make it easier to identify score-equivalent
arcs.gs,
iamb, fast.iamb, inter.iamb, mmpc,
hc, tabucriterion is the label of a score function, see
score for details), the conditional independence test
(currently the only one isTRUE a lot of debugging output
is printed; otherwise the function is completely silent.arc.strength, boot.strength and custom.strength
return an object of class bn.strength; boot.strength
and custom.strength also include information about the relative
probabilities of arc directions. averaged.network returns an object of class bn.
See bn.strength class and bn-class for details.
criterion is a conditional independence test, the strength
is a p-value (so the lower the value, the stronger the relationship).
The only possible additional parameter is B, the number of
permutations to be generated for each permutation test. If criterion is the label of a score function, the strength is
measured by the score gain/loss which would be caused by the arc's
removal. There may be additional parameters depending on the choice
of the score, see score for details.
Model averaging is supported for objects of class bn.strength
returned by boot.strength, by custom.strength,
or by arc.strength with criterion set to
bootstrap. The returned network contains the arcs whose strength
is greater than the threshold attribute of the bn.strength
object passed to averaged.network.
Friedman N, Goldszmidt M, Wyner A (1999). "Data Analysis with Bayesian Networks: A Bootstrap Approach". In "UAI '99: Proceedings of the 15th Annual Conference on Uncertainty in Artificial Intelligence", pp. 196-201. Morgan Kaufmann.
for the computation of the strength (confidence) significance threshold:
Scutari M, Nagarajan R (2011). "On Identifying Significant Edges in Graphical Models". In "Proceedings of the Workshop 'Probabilistic Problem Solving in Biomedicine' of the 13th Artificial Intelligence in Medicine (AIME) Conference", pp. 15-27.
strength.plot, choose.direction,
score, ci.test.data(learning.test)
res = gs(learning.test)
res = set.arc(res, "A", "B")
arc.strength(res, learning.test)
arcs = boot.strength(learning.test, algorithm = "hc")
arcs[(arcs$strength > 0.85) & (arcs$direction >= 0.5), ]
averaged.network(arcs)
start = random.graph(nodes = names(learning.test), num = 50)
netlist = lapply(start, function(net) {
hc(learning.test, score = "bde", iss = 10, start = net) })
arcs = custom.strength(netlist, nodes = names(learning.test),
cpdag = FALSE)
arcs[(arcs$strength > 0.85) & (arcs$direction >= 0.5), ]
modelstring(averaged.network(arcs))Run the code above in your browser using DataLab