Multivariate density estimation by Bayesian sequential partitioning and its applications