[SciPy-Dev] Expanding Scipy's KDE functionality

Daniel Smith smith.daniel.br@gmail....
Wed Jan 23 14:11:51 CST 2013


This was started on a different thread, but I thought I would post a
new thread focused on this. Currently, I have some existing code that
implements the bandwidth selection algorithm from:

Z. I. Botev, J. F. Grotowski, and D. P. Kroese. Kernel density
estimation via diffusion. The Annals of Statistics, 38(5):2916-2957,

Zdravko Botev implemented the code in MatLab which can be found here:


My code for that is here:


I assume I probably need to find a workaround to avoid the float128 in
the function fixed_point before I can add it to SciPy. I wrote the
code a couple of years ago, so it will take me a moment to map out the
best workaround (there is a very large number being multiplied by a
very small number). I can also add the 2d-version once I start
integrating with SciPy. I have a couple of questions remaining. First,
should I implement this in SciPy? StatsModels? Both? Secondly, can I
use Cython to generate C code for the function fixed_point? Or do I
need to write it up in the Numpy C API?

If there is somewhere else I should post this and/or someone I should
directly contact, I would greatly appreciate it.


More information about the SciPy-Dev mailing list