A Bayesian Approach to Learning Bayesian Networks with Local Structure