|21 Jan 2011||Kernel Density Estimator Reliable and extremely fast kernel density estimator for one-dimensional data||Zdravko Botev||
Due to numerical round-off error from the fft.m function, it is possible to get density values of -1.38e-018 (instead of 0) and cdf values slightly larger than 1.
|15 Oct 2010||Kernel Density Estimator Reliable and extremely fast kernel density estimator for one-dimensional data||Zdravko Botev||
Dear George, the kde function works as it should. There is no problem with the kde. What you call a problem is actually one of the main strengths of the routine.
By typing data = [d1;d1;d1;d1;d1;d2;d3];
The kde.m CORRECTLY recognizes that the data you have provided is perfectly discrete and since discrete data does not need smoothing, the selected bandwidth should be zero. kde.m is the only routine I am aware of that does this correctly, every other routine fails this BASIC theoretical test.