BNM function

Bayesian Network Model