Kernel density estimation is one of the most popular techniques for density estimation i.e., estimation of probability density functions, which is one of the fundamental questions in statistics.
It can be viewed as a generalisation of histogram density estimation with improved statistical properties.
Kernel density estimators were first introduced in the scientific literature for univariate data in the 1950s and 1960s[1][2] and subsequently have been widely adopted. It was soon recognised that analogous estimators for multivariate data would be an important addition to multivariate statistics. Based on research carried out in the 1990s and 2000s, multivariate kernel density estimation has reached a level of maturity comparable to their univariate counterparts.[3]
Motivation
To motivate the definition of multivariate kernel density estimators, we take as an illustrative bivariate data set drawn from ....
Problems with bivariate histograms.
Definition
Let be a d-variate random sample drawn from a common density function f. The kernel density estimate is defined to be
where
- , are d-vectors
- K is the kernel function which is a symmetric density function, with
- H is the bandwidth (or smoothing) matrix which is a symmetric, positive definite d x d matrix.
The choice of the kernel function K is not crucial to the accuracy of kernel density estimators, whereas the choice of the bandwidth matrix H is the single most important factor affecting its accuracy [4](pp. 36-39). So we use the standard multivariate normal or Gaussian density function as our kernel K
Optimal bandwidth matrix selection
The most commonly used optimality criterion for selecting a bandwidth matrix is the MISE or Mean Integrated Squared Error
This is in general does not possess a closed form expression, so it is usual to use its asymptotic approximation (AMISE) as a proxy
where
- , with when is a normal kernel
- , with Id being the d x d identity matrix, with m2 = 1 for the normal kernel
- is the d x d Hessian matrix of second order partial derivatives of
- is a d2 x d2 matrix of integrated fourth order partial derivatives of f
- vec is the vector operator which stacks the columns of a matrix into a single vector e.g.
This formula of the AMISE is due to [4](p. 97). The quality of the AMISE approximation to the MISE is given by
where o, O indicate the usual small and big O notation. Heuristically this statement implies that the AMISE is a 'good' approximation of the MISE as the sample size n → ∞.
The ideal optimal bandwidth selector is where F is the space of all symmetric, positive definite matrices. Since this ideal selector contains the unknown density function f, it cannot be used directly. The many different varieties of data-based bandwidth selectors arise from the different estimators of the AMISE. We concentrate on two classes of selectors which have been shown to be the most widely applicable in practise: smoothed cross validation and plug-in selectors.
Plug-in
The plug-in (PI) selector of the AMISE is formed by replacing the Hessian matrix by its estimator
where . Thus is the plug-in selector[5][6]. These references also contain algorithms on optimal estimation of the pilot bandwidth matrix G.
Smoothed cross validation
Smoothed cross validation (SCV) is a subset of a larger class of cross validation techniques. The SCV estimator differs from the plug-in estimator in the second term
Thus is the SCV selector[7][8]. These references also contain algorithms on optimal estimation of the pilot bandwidth matrix G.
Implementation in the R statistical software
The ks package[9] in the R programming language implements the plug-in and smoothed cross validation selectors. This example is based on the Old Faithful Geyser in Yellowstone National Park, USA. This dataset contains 272 records with two measurements each: the eruption duration time (minutes) and the waiting time until the next eruption (minutes), and is contained in the base distribution of R.
This code fragment computes the kernel density estimate with the plug-in bandwidth matrix. The coloured contours correspond to the smallest region which contains that corresponding probability mass: red = 25%, orange + red = 50%, yellow + orange + red = 75%. To compute the SCV selector, Hpi
is replaced with Hscv
. This is not displayed here since it is mostly similar to the plug-in estimate for this data set.
library(ks) data(faithful) H <- Hpi(x=faithful) fhat <- kde(x=faithful, H=H) plot(fhat, display="filled.contour2") points(faithful)
References
- ^ Rosenblatt, M. (1956). "Remarks on some nonparametric estimates of a density function". Annals of Mathematical Statistics. 27: 832–837. doi:10.1214/aoms/1177728190.
- ^ Parzen, E. (1962). "On estimation of a probability density function and mode". Annals of Mathematical Statistics. 33: 1065–1076. doi:10.1214/aoms/1177704472.
- ^ Simonoff, J.S. (1996). Smoothing Methods in Statistics. Springer. ISBN 0387947167.
- ^ a b Wand, M.P; Jones, M.C. (1995). Kernel Smoothing. London: Chapman & Hall. ISBN 0412552701. Cite error: The named reference "WJ1995" was defined multiple times with different content (see the help page).
- ^ Wand, M.P.; Jones, M.C. (1994). "Multivariate plug-in bandwidth selection". Computational Statistics. 9: 97–177.
- ^ Duong, T.; Hazelton, M.L. (2003). "Plug-in bandwidth matrices for bivariate kernel density estimation". Journal of Nonparametric Statistics. 15: 17–30. doi:10.1080/10485250306039.
- ^ Hall, P.; Marron, J.; Park, B. (1992). "Smoothed cross-validation". Probability Theory and Related Fields. 92: 1–20. doi:10.1007/BF01205233.
- ^ Duong, T.; Hazelton, M.L. (2005). "Cross validation bandwidth matrices for multivariate kernel density estimation". Scandinavian Journal of Statistics. 32: 485–506. doi:10.1111/j.1467-9469.2005.00445.x.
- ^ Duong, T. (2007). "ks: Kernel density estimation and kernel discriminant analysis in R". Journal of Statistical Software. 21(7).
External links
- www.mvstat.net/tduong/research A collection of peer-reviewed articles of the mathematical details of multivariate kernel density estimation and their bandwidth selectors.
See also
- Kernel density estimation Univariate kernel density estimation.