Estimation of multivariate densities with adaptive histograms