[SciPy-User] Kernel analysis from R to scipy
Victor Gonzalez
victor.gonzalez at geomati.co
Fri May 3 09:01:50 EDT 2013
Thanks a lot for the quick response! I'll check it later, but seems exactly
what I've been looking for. Thanks!
Víctor.
2013/5/3 <josef.pktd at gmail.com>
> On Fri, May 3, 2013 at 4:24 AM, Victor Gonzalez
> <victor.gonzalez at geomati.co> wrote:
> > 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
>
> statsmodels has LSCV for kernel density estimation
>
> http://statsmodels.sourceforge.net/notebooks/nonparametric.html
> there are tutorial examples for the univariate case
>
> http://statsmodels.sourceforge.net/notebooks/examples/notebooks/generated/kernel_density.html
>
> this requires a recent master version of statsmodels, or a soon to be
> released version.
>
> Josef
>
> >
> >
> >
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User at scipy.org
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> >
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130503/7411f6d4/attachment.html>
More information about the SciPy-User
mailing list