Simple algorithm for expectation Maximization of Bayes Net