Tree-based Methods for Learning Probability Distributions