[SciPy-Dev] Expanding Scipy's KDE functionality

josef.pktd@gmai... josef.pktd@gmai...
Fri Jan 25 12:03:58 CST 2013

On Fri, Jan 25, 2013 at 11:01 AM, Sturla Molden <sturla@molden.no> wrote:
> On 25.01.2013 16:28, josef.pktd@gmail.com wrote:
>> If you just use a delta function,  you get the original data back, and
>> we get the empirical distribution function, isn't it.I don't
>> understand how this relates to digitizing the data.
> What you get is a mathematical function that describes the data as an
> analog signal. The KDE can be seen as an anti-alias filter and an ADC.
>> The pointwise variance of the density estimate is much smaller with a
>> smooth, large bandwidth kernel, and the main task is to find the right
>> bias-variance trade-off.
> Bias-variance trade-off is the statistical perspective. The DSP
> perspective is selecting the appropriate low-pass filtering frequency.
> But numerically it is the same.

First, I still have problems to understand some of the DSP terminology
and have to translate it into statistics or time series analysis.

The two main differences I see from the "typical" assumptions
DSP works with equal spaced time intervals, KDE works with unequal
(random) location of the points (binned fft and similar are an

KDE imposes properties of a density function, non-negative and
integrating to one, while an arbitrary bandpass filter doesn't impose

However as in the current case, binning and fft convolution works
faster for KDE in large samples, (and it might still be an
under-exploited property.)

> But what if the distribution has a sharp edge?
> In DSP one often finds that wavelet shrinkage is better than low-pass
> filters at suppressing white noise from an arbitrary waveform. That for
> example applies to density estimation too. Wavelets can do better than KDE.

That's a different kind of fish.

I haven't seen any ready made recipes for density estimation with
wavelets. Ralph and I briefly discussed this a while ago that it would
be nice to have.

In my first tries to understand wavelets using pywavelets, I didn't
manage to get anything that looked smooth. My impression was that we
might get sharp edges that are there, but we also get sharp bouncing
around where it should be smooth.
(After that, I decided I'm not interested enough to figure out the
details on my own.)


> Sturla
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev

More information about the SciPy-Dev mailing list