[SciPy-User] Kernel analysis from R to scipy

Victor Gonzalez victor.gonzalez at geomati.co
Fri May 3 04:24:58 EDT 2013


Hi all,

I'm trying to migrate a functionality from R to python. It has to perform a
kernel density estimation and I managed to use gaussian_kde [1]
successfully. The problem is that I need to use the least squares
cross-validation (LSCV) for the bandwidth selection and, as far as I can
see, only 'scotts' and 'silverman' rule of thumb are supported. Is there a
way to perform the kernel estimation with LSCV?

If you need more info on what I'm trying to do, here is the definition in R
of the kernel that I'm trying to migrate [2] (page 124). Here is an example
of how to use the kernel in R to obtain some results [3]. And here is the
link to download the R source code [4].

Thanks in advance,
Víctor.

[1]
http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html
[2] http://cran.r-project.org/web/packages/adehabitat/adehabitat.pdf
[3] https://trac.faunalia.it/animove/wiki/AnimoveHowto#Kernelhomerange
[4] http://cran.r-project.org/web/packages/adehabitat/index.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130503/6607fd51/attachment.html>


More information about the SciPy-User mailing list