Stochastic complexity of Bayesian networks