Biology Reference
In-Depth Information
Furthermore, we can check that the Markov blanket of a given node ( VECT in this
example) is indeed composed by its children ( chld ), its parents ( par ), and its
children's other parents ( o.par ), as stated in Definition 2.3 .
> chld = children(dag, "VECT")
> par = parents(dag, "VECT")
> o.par = sapply(chld, parents, x = dag)
> unique(c(chld, par, o.par[o.par != "VECT"]))
[1] "MECH" "ALG"
> mb(dag, "VECT")
[1] "MECH" "ALG"
Several scoring criteria have been proposed in the context of structure learning.
The example below demonstrates the log-likelihood score of a Bayesian network
and how it changes in response to changes in the graph structure. More importantly,
it demonstrates the invariance of the log-likelihood for networks in the same equiv-
alence class as expected.
> score(dag, data = marks, type = "loglik-g")
[1] -1695.525
> dag.eq = reverse.arc(dag, "STAT", "ANL")
> score(dag.eq, data = marks, type = "loglik-g")
[1] -1695.525
As can be seen from Fig. 2.2 ,thearc STAT ANL does not belong to any
v-structure nor does ANL STAT . This is easy to check using the vstructs
function, which shows that in fact neither dag nor dag.eq contains any v-structure
(denoted in the output a
X Z Y
).
> vstructs(dag)
XZY
> vstructs(dag.eq)
XZY
In all convergent connections present in dag and dag.eq , the two parent nodes
are connected by an arc; therefore, they are not v-structures. Koller and Friedman
( 2009 ) call them moral v-structures , because the parents are “married” as in a moral
graph.
> vstructs(dag, moral = TRUE)
X Z Y
[1,] "VECT" "MECH" "ALG"
[2,] "ANL" "ALG" "STAT"
> vstructs(dag.eq, moral = TRUE)
X Z Y
[1,] "VECT" "MECH" "ALG"
[2,] "ANL" "ALG" "STAT"
Search WWH ::




Custom Search