A data-based algorithm for choosing the window width when estimating the density at a point