Multivariate kernel density estimation: Difference between revisions

Content deleted Content added
Drleft (talk | contribs)
No edit summary
Drleft (talk | contribs)
No edit summary
Line 9:
To motivate the definition of multivariate kernel density estimators, we take as an illustrative synthetic [[bivariate]] data set of 50 points. First we create a histogram. This requires the choice of an anchor point (the lower left corner of the histogram grid). For the histogram on the left, we choose (-1.5, -1.5): for the one on the right, we shift the anchor point by 0.125 to (-1.625, -1.625). Both histograms have a binwidth of 0.5, so any differences are due to the change in the anchor point only. The colour coding indicates the number of data points which fall into a bin: 0=white, 1=pale yellow, 2=bright yellow, 3=orange, 4=red. The left histogram appears to indicate that the upper half has a higher density than the lower half, whereas it is the reverse is the case. It is well-known that histograms are highly sensitive the placement of the anchor point.
 
[[Image:Synthetic data 2D histograms.png|center|720px]]
 
One possible solution to this anchor point placement problem to remove the histogram binning grid completely. In the left figure below, a kernel (represented by the dashed grey lines) is placed at the same 50 data points above. Then the result of summing these kernels is given on the right figure, which is a kernel density estimate.
 
[[Image:Synthetic data 2D KDE.png|center|720px]]
 
== Definition ==
Line 94:
fhat <- kde(x=faithful, H=H)
plot(fhat, display="filled.contour2")
points(faithful, cex=0.5, pch=16)
</pre>
 
[[Image:Old Faithful Geyser KDE with plugin bandwidth.png|center|360px]]