Collective mining of Bayesian networks from distributed heterogeneous data