Local data-driven bandwidth choice for density estimation