Learning Bayesian Network Structure from Massive Datasets: The "Sparse Candidate" Algorithm