I want to use KernelMixtureDistribution
to deal with a large amount of data points. For example, the following codes shows how I use it:
data = RandomReal[{0, 1}, {10000, 2}];
d1 = KernelMixtureDistribution[data, MaxMixtureKernels -> All]
ContourPlot[PDF[d1, {x, y}], {x, 0, 1}, {y, 0, 1}, PlotRange -> All, ColorFunction -> "TemperatureMap", Contours -> 20]
and it works fine. However, I want to specify the bandwidth manually, like this:
d2 = KernelMixtureDistribution[data, 0.01, MaxMixtureKernels -> All]
ContourPlot[PDF[d2, {x, y}], {x, 0, 1}, {y, 0, 1}, PlotRange -> All, ColorFunction -> "TemperatureMap", Contours -> 20]
then it gives me a lot of error message and gets stuck:
To specify a bandwidth manually is important for me. So my question is: how to fix that?