Imported from https://github.com/miladce/Bayesian-network-learning
