A partial likelihood approach to tree-based density modeling and its application in Bayesian inference