  The benefits of the wavelet approach for density estimation are well
established in the literature, especially when the density to estimate is
irregular or heterogeneous in smoothness. However, wavelet density estimates
are typically not bona fide densities. In Aya-Moreno et al (2018), a
`shape-preserving' wavelet density estimator was introduced, including as main
step the estimation of the square-root of the density. A natural concept
involving square-root of densities is the Hellinger distance - or equivalently,
the Bhattacharyya affinity coefficient. In this paper, we deliver a fully
data-driven version of the above 'shape-preserving' wavelet density estimator,
where all user-defined parameters, such as resolution level or thresholding
specifications, are selected by optimising an original leave-one-out version of
the Hellinger-Bhattacharyya criterion. The theoretical optimality of the
proposed procedure is established, while simulations show the strong practical
performance of the estimator. Within that framework, we also propose a novel
but natural 'jackknife thresholding' scheme, which proves superior to other,
more classical thresholding options.
