# [SciPy-User] Epanechnikov kernel

Norman Vine nhv@cape....
Sat Jan 19 07:18:03 CST 2013

```for a pdf function that can use most of the standard kernels see

http://bonsai.hgc.jp/~mdehoon/software/python/Statistics/

"y, x = pdf(data, weight = None, h = None, kernel = 'Epanechnikov', n = 100)\n"
"or\n"
"y = pdf(data, x, weight = None, h = None, kernel = 'Epanechnikov')\n"
"\n"
"This function estimates the probability density function from the random\n"
"numbers in the array data, using the bandwidth h and the specified kernel\n"
"function.\n"

………..

"o) The keyword argument 'kernel' specifies the kernel function:\n"
"   -'E' or 'Epanechnikov' : Epanechnikov kernel (default)\n"
"   -'U' or 'Uniform'      : Uniform kernel\n"
"   -'T' or 'Triangle'     : Triangle kernel\n"
"   -'G' or 'Gaussian'     : Gaussian kernel\n"
"   -'B' or 'Biweight'     : Quartic/biweight kernel\n"
"   -'3' or 'Triweight'    : Triweight kernel\n"
"   -'C' or 'Cosine'       : Cosine kernel\n"

On Jan 19, 2013, at 7:49 AM, josef.pktd@gmail.com wrote:

> On Sat, Jan 19, 2013 at 6:34 AM, francescoboccacci@libero.it
> <francescoboccacci@libero.it> wrote:
>> Hi all,
>>
>> I have a question for you. Is it possible in scipy using a Epanechnikov
>> kernel function?
>>
>> I checked on scipy documentation but i found that the only way to calculate
>> kernel-density estimate is possible only with using Gaussian kernels?
>>
>> Is it true?
>
> Yes, kde in scipy.stats only has gaussian_kde
>
> Also in statsmodels currently only gaussian is supported for
> continuous data
> http://statsmodels.sourceforge.net/devel/nonparametric.html
> (It was removed because in the references only the bandwidth selection
> made much difference in the estimation, but not the shape of the
> kernel. Other kernels for continuous variables will come back
> eventually.
> There is still some old code in the sandbox for generic kernels
> https://github.com/statsmodels/statsmodels/blob/master/statsmodels/sandbox/nonparametric/kernels.py
> No idea about the status.
> On the other hand we do have automatic bandwidth selection, and
> kernels for categorical and ordered variables.)
>
> astroML http://astroml.github.com/modules/generated/astroML.density_estimation.KDE.html#astroML.density_estimation.KDE
> has some other kernels, but not Epanechnikov.
>
> Josef
>
>>
>> Can you help me?
>>
>>
>> Thanks
>>
>>
>> Francesco
>>
>>
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@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/20130119/19c75bcc/attachment.html
```