In the book "Bayesian Networks in R", the authors learn the structure of the marks data set using the Grow - Shrink implementation. Should I expect the gs function to give different outputs for the learned structure? Perhaps maybe just learn a structure from within the equivalence class?
What's confusing me is that I run the code below and I get the output:
Bayesian network learned via Constraint-based methods
model:
[undirected graph]
nodes: 5
arcs: 6
undirected arcs: 6
directed arcs: 0
average markov blanket size: 2.40
average neighbourhood size: 2.40
average branching factor: 0.00
learning algorithm: Grow-Shrink
conditional independence test: Pearson's Correlation
alpha threshold: 0.05
tests used in the learning procedure: 80
but in the book, they claim to get a directed graph
Bayesian network learned via Constraint-based methods
model:
[STAT][ANL|STAT] [ALG|ANL:STAT] [VECT|ALG] [MECH|VECT:ALG]
nodes: 5
arcs: 6
undirected arcs: 0
directed arcs: 6
average markov blanket size: 2.40
average neighbourhood size: 2.40
average branching factor: 1.20
learning algorithm: Grow-Shrink
conditional independence test: Pearson's Correlation
alpha threshold: 0.05
tests used in the learning procedure: 32
optimized TRUE
According to what's included in the book, the only code they ran was
bn.gs = gs(marks)
bn.gs
The code that I ran was
library(bnlearn)
bn_gs = gs(marks)
bn_gs
What could possibly be different?