Equivalence classes, moral graphs and consistent extensions
Find the equivalence class and the v-structures of a Bayesian network, construct its moral graph, or create a consistent extension of an equivalent class.
cpdag(x, moral = FALSE, wlbl = FALSE, debug = FALSE) cextend(x, strict = TRUE, debug = FALSE) moral(x, debug = FALSE) colliders(x, arcs = FALSE, debug = FALSE) shielded.colliders(x, arcs = FALSE, debug = FALSE) unshielded.colliders(x, arcs = FALSE, debug = FALSE) vstructs(x, arcs = FALSE, moral = FALSE, debug = FALSE)
x |
an object of class |
arcs |
a boolean value. If |
moral |
a boolean value. If |
wlbl |
a boolean value. If |
strict |
a boolean value. If no consistent extension is possible and
|
debug |
a boolean value. If |
What kind of arc configuration is called a v-structure is not uniquely defined in literature. The original definition from Pearl (2000), which is still followed by most texts and papers, states that the two parents in the v-structure must not be connected by an arc. However, Koller and Friedman (2009) call that a immoral v-structure and call a moral v-structure a v-structure in which the parents are linked by an arc. This mirrors the unshielded versus shielded collider naming convention, but it is confusing.
Setting moral
to TRUE
in cpdag()
and vstructs()
makes those functions follow the definition from Koller and Friedman (2009);
the default value of FALSE
, on the other hand, makes those functions
follow the definition from Pearl (2000). The former call v-structures
both shielded and unshielded colliders (respectively moral v-structures
and immoral v-structures); the latter requires v-structures to be
unshielded colliders. Hence, the moral
argument controls whether moral
v-structures (shielded colliders) are returned along with immoral v-structures
(unshielded collides).
Note that arcs whose directions are dictated by the parametric assumptions of
conditional linear Gaussian networks are preserved as directed arcs in
cpdag()
.
cpdag()
returns an object of class bn
, representing the
equivalence class. moral
on the other hand returns the moral graph.
See bn-class
for details.
cextend()
returns an object of class bn
, representing a DAG that
is the consistent extension of x
.
vstructs()
returns a matrix with either 2 or 3 columns, according to the
value of the arcs
argument.
Marco Scutari
Dor D (1992). A Simple Algorithm to Construct a Consistent Extension of a Partially Oriented Graph. UCLA, Cognitive Systems Laboratory.
Koller D, Friedman N (2009). Probabilistic Graphical Models: Principles and Techniques. MIT Press.
Pearl J (2009). Causality: Models, Reasoning and Inference. Cambridge University Press, 2nd edition.
data(learning.test) res = gs(learning.test) cpdag(res) vstructs(res)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.