| Index | Topics |
| arc.strength {bnlearn} | R Documentation |
Measure the strength of the arcs present in the network
Description
Strength of the probabilistic relations expressed by the arcs of the Bayesian network.
Usage
arc.strength(x, data, criterion = NULL, ..., debug = FALSE)
Arguments
x |
an object of class bn. |
data |
a data frame containing the data the Bayesian network was learned from. |
criterion |
a character string, the label of a score function, the label of an independence test or
bootstrap. See bnlearn-package for details on
the first two possibilities. |
... |
additional tuning parameters for the network score (if criterion is the label of a score
function, see score for details), the conditional independence test
(currently the only one is B, the number of permutations) or the bootstrap simulation (if
criterion is set to bootstrap, see boot.strength for details). |
debug |
a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is
completely silent. |
Details
If 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 functioni, 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.
If criterion is bootstrap, the strength is computed as in boot.strength. The additional parameters are R, m,
algorithm and algorithm.args; if the latter two are not specified, the values stored
in x are used.
Value
arc.strength returns an object of class bn.strength. See bn.strength class for details.
Author(s)
Marco Scutari
See Also
Examples
data(learning.test) res = gs(learning.test) res = set.arc(res, "A", "B") arc.strength(res, learning.test) # from to strength # 1 A B 0.000000e+00 # 2 A D 0.000000e+00 # 3 B E 1.024198e-320 # 4 C D 0.000000e+00 # 5 F E 3.935648e-245 arc.strength(res, learning.test, criterion = "aic") # from to strength # 1 A B -1166.9139 # 2 A D -1978.0531 # 3 B E -746.8954 # 4 C D -862.8637 # 5 F E -568.7816 res = set.arc(res, "B", "A") # A -> B and B -> A have the same strength because they # are score equivalent. arc.strength(res, learning.test, criterion = "aic") # from to strength # 1 A D -1978.0531 # 2 B E -746.8954 # 3 C D -862.8637 # 4 F E -568.7816 # 5 B A -1166.9139 ## Not run: arc.strength(res, data = learning.test, criterion = "bootstrap", R = 200, algorithm.args = list(alpha = 0.10)) # from to strength # 1 A B 1 # 2 A D 1 # 3 B E 1 # 4 C D 1 # 5 F E 1 ## End(Not run)
| Index | Topics |
