0
$\begingroup$

Can Kernel Density Estimation estimate an Exponential Distribution?

I tried to performed to make experiments with various kernels like: "gaussian" and "exponential", but performance seems to be very poor. https://scikit-learn.org/stable/modules/density.html

What is the reason?

$\endgroup$
1
$\begingroup$

Besides the possible problem of an inappropriate smoothing parameter, I suspect that the main issue is that you are using kernel functions with a support that does not coincide with the support of the pdf you are trying to estimate, namely an exponential distribution.

This is known to cause problems, and has prompted a decent amount of research, including this extremely interesting solution.

$\endgroup$
1
$\begingroup$

The problem is the hard boundary; unless you specifically modify things to account for it you'll have problems.

If your data are truly close to a continuous exponential, you might get an adequate approximation by applying a typical KDE to the cube root (which results in something much closer to a Gaussian) and then transforming back -- as long as you remember to include the Jacobian when you take it back. This won't fully respect the boundary but the effect is usually very small; it will also smooth out the peak.

Using a log-transform instead has been suggested here on CV before (including by me); it sometimes works quite well but sometimes it's not very good at the low end, though it does respect that zero boundary.

With either transformation you will not get the sharp exponential "cut-off" at zero but a pretty smooth trend down toward zero.

There are a variety of methods for estimating densities that often work well with this situation -- logspline density estimation may be a good choice; I have had some good experiences with it in situations similar to this.

However if your histogram on your other question is anything to go by, it looks like your data are discrete, with spikes at round numbers; a KDE won't handle that well (especially not the discreteness at the smallest values); so if that's what you're working with I doubt this line of thought will get you to somewhere useful.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.