cpdag(x, moral = TRUE, wlbl = FALSE, debug = FALSE)
cextend(x, strict = TRUE, debug = FALSE)
vstructs(x, arcs = FALSE, moral = TRUE, debug = FALSE)
moral(x, debug = FALSE)
bn
.TRUE
the arcs that are part of at least
one v-structure are returned instead of the v-structures themselves.TRUE
we define a v-structure as in
Pearl (2000); if FALSE
, as in Koller and Friedman (2009). See below.TRUE
arcs whose directions have been
fixed by a whitelist or a by blacklist are preserved when constructing
the CPDAG.strict
is TRUE
, an error is generated; otherwise a partially
extended graph is returned with a warning.TRUE
a lot of debugging output is
printed; otherwise the function is completely silent.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.moral
to FALSE
in cpdag
and vstructs
makes
those functions follow the definition from Koller and Friedman (2009); the
default value of TRUE
, 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. Note that arcs whose directions are dictated by the parametric assumptions of
conditional linear Gaussian networks are preserved as directed arcs in
cpdag
.data(learning.test)
res = gs(learning.test)
cpdag(res)
vstructs(res)
Run the code above in your browser using DataLab