0

Using the bnlearn package I can learn the structure of a BN just by passing my dataset as parameter, for example:

bn1 <- blnearn :: hc (dataset)

Or must I pass some edges as prior knowledge eg:

wl = data.frame (from = c ("A", "B"), to = c ("B", "C")) bn1 <- blnearn :: hc (datase, whitelist = wl)

What I mean is the bnlearn algorithms has capacity to learn the structure from data only or always need some help with prior knowledge.

1 Answers1

1

bnlearn features both structural learning and manual creation of structures in your network.

Basic structural learning is as easy as you assumed:

bn1 <- hc(x = dataset)

If you have prior knowledge about the structure that you want to include, you can use the whitelist or blacklist argument. But this is optional.

For starters I suggest this Introductory tutorial on Bayesian networks in R by Jacinto Arias including an example on structural learning.

locom
  • 115
  • 9