What do the options of SmoothKernelDistribution do?
@Emre described the options quite well. Worth mentioning here is KernelMixtureDistribution
which is a parametric equivalent to SmoothKernelDistribution
. The goal of SmoothKernelDistribution
is to interpolate the PDF (using linear interpolation) given by KernelMixtureDistribution
.
In my work I use KernelMixtureDistribution
when speed is less of an issue than quality since it is always a more accurate representation of a kernel density estimator and is capable of handling symbolic inputs. I use SmoothKernelDistribution
when I want a quick, numeric and usually visual approximation to some density.
It is also worth pointing out the setting MaxMixtureKernels -> All
guarantees that a kernel will be placed at each data point rather than on a uniform grid. This is a good setting to use whenever the number of data points is not astronomically large.
You can click on each of these variables in the help for further explanation.
MaxMixtureKernels: the maximum number of kernels to generate the estimate from. The example in the help file makes this quite clear:
As you can increase the number of kernels (tent poles, if you will) from 10, 15, 25, to 100, the smoother the estimate becomes, at the expense of complexity (more parameters to estimate).
InterpolationPoints: How many points the interpolation function (kernel density estimate) is to be evaluated at.
10 points on the left, 100 on the right. First you fix the number of kernels (consider the previous diagram), then you select where to sample the interpolant.
MaxRecursion: An option for the Plot
function to achieve better results in places where more samples are needed. Again, the help file provides some illuminating illustrations:
MaxRecursion http://reference.wolfram.com/mathematica/ref/Files/MaxRecursion.en/O_4.gif
Here the levels of recursion runs from 0,1,2,4.