initBN function

initBN: a function to initialize the bayesian network.