Implement Bayesian Networks Machine