[SciPy-Dev] Expanding Scipy's KDE functionality

Pierre Barbier de Reuille pierre@barbierdereuille....
Fri Jan 25 12:41:56 CST 2013


On 25 January 2013 17:36, Daniel Smith <smith.daniel.br@gmail.com> wrote:

> You are correct. I had always ended up having padding on each side and
> gotten nonsense near the boundary. When I fixed the boundary
> correctly, it gave me nice answers. Could you send me your code for
> the cyclic density? I do some molecular dynamics work, and it would be
> really useful for making angular density plots.
>

Hey, I attach the code here.

As for your other part, I will have to think about it, but essentially I
came up with the conclusion that the bandwidth estimation would require a
sparser grid than the density estimation. Making some test, a grid of 2^10
elements seem plenty (i.e. I get 4 significant digits compared to 2^14) and
computation time falls from ~250ms to ~15ms using a dataset with 1000
samples. And 15 ms to compute the bandwidth is perfectly acceptable for me.
Now, if you have an adaptive method that can perform similarly, that would
be awesome. The bandwidth can then be used in any context in which it make
sense.

-- 
Barbier de Reuille Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20130125/84bd3aeb/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kde_fft.py
Type: application/octet-stream
Size: 1034 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-dev/attachments/20130125/84bd3aeb/attachment.obj 


More information about the SciPy-Dev mailing list