- Introduced by
- Silverman, B. W.; Diggle, P. J.
- Year
- 1985-1986
- Type
- Non-parametric density estimator
- Family
- GIS / spatial
What does it do?
Local Kernel Density Estimation (Local KDE) is a non-parametric method that estimates the spatial density of point events across a study area using a kernel function whose bandwidth varies with location.
Unlike global KDE, which applies one fixed bandwidth everywhere, Local KDE narrows the smoothing window where events are dense and widens it where they are sparse. The result is a continuous density surface that can resolve fine-scale clustering without producing noise in thinly populated parts of the region.
The intuition behind the method
Picture placing a smooth mound over each observed event and summing the mounds to form a surface. In a global KDE, every mound has the same width, whether it sits in a crowded neighbourhood or an empty one. Local KDE makes the width depend on a pilot estimate of local density: mounds shrink in dense clusters so peaks stay sharp, and grow in sparse areas so isolated events still contribute a smooth, stable value. How closely the surface follows the local pattern therefore depends on how well the pilot density was estimated.
History
The non-parametric density estimation framework on which Local KDE rests is treated in Silverman (1986), which covers kernel density estimation and bandwidth selection for kernel estimators. Diggle (1985) applied kernel smoothing to point process data, the setting in which Local KDE is most often used. The adaptive, pilot-based bandwidth rule builds on this kernel framework.
When to use it
Choose Local KDE for point event data, such as crime incidents, disease cases, retail locations, or accident sites, when the intensity is expected to vary strongly across the region. It is preferable to global KDE when the pattern contains both dense clusters and sparse areas, because a single bandwidth must otherwise either over-smooth the clusters or leave the sparse areas noisy. Avoid it when events show no clustering or a regular spacing, or when the number of events is too small for the pilot density to be reliable. If you need formal inference about clusters, use a test-based local statistic such as Getis-Ord Gi*, which provides z-scores and p-values (see limitations).
Limitations and considerations
- The local bandwidths depend on the pilot density, and different pilot estimators can produce markedly different surfaces.
- The global parameter h still has to be chosen, and selection methods do not give a single correct value.
- The method provides no hypothesis test or p-value for identified hotspots; a complementary method such as Getis-Ord Gi* is needed for inference.
- Computation grows with the number of events and the grid resolution, which can be demanding for large point datasets.
- Near the study-area boundary the kernels are truncated, which biases density downward unless an edge correction is applied.
- The number of events needed for a stable pilot depends on the data and is not specified here, so check the stability of the pilot estimate before interpreting the surface.
- The pilot bandwidth is also a choice. Cross-validation or plug-in methods (see the FAQ on bandwidth selection) can guide it, and results should be checked for sensitivity to both h and the pilot setting.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The bandwidth adapts to local event density through the pilot-based rule, keeping peaks in dense clusters sharp while avoiding spurious detail in sparse areas.
- Produces a continuous density surface that can be exported as a raster for GIS visualisation and overlay with other spatial layers.
- Non-parametric: it does not assume a particular distributional form for the point process.
- Applies to point event data regardless of whether any attribute is attached to the events.
- Available in a number of GIS and statistical software packages; the implementation and pilot settings should be reported with the results.
Applications
- Crime analysis: mapping robbery or burglary concentrations in a city, where incidents cluster in some districts and are sparse elsewhere.
- Epidemiology: estimating the spatial intensity of disease cases where population density and reporting vary across the region.
- Ecology: mapping sighting density from surveys with uneven effort, where local sampling intensity changes sharply.
- Urban planning: showing where accidents or foot traffic concentrate around intersections and transit hubs, where dense zones need finer resolution.
- Environmental monitoring: mapping pollution-event intensity across industrial regions where monitoring points are unevenly distributed.
How it works
How it works
A pilot estimate of density, written here as λ(x_i), is computed at each location. The local bandwidth is then h_i = h · λ(x_i)^(-1/2), where h is the global smoothing parameter. The bandwidth is small where the pilot density is high and large where it is low, so the adaptive bandwidths are only as reliable as the pilot estimate. The scale of λ depends on how the pilot is normalised, so the meaning of h should be confirmed in the implementation used; the global h needs its own selection method.
Formula
h_i = h \cdot \lambda(x_i)^{-1/2}A kernel K, typically Gaussian or Epanechnikov (quartic) form, is centred on each observed event and scaled by its local bandwidth. The estimate at a target location sums these kernel contributions over all events and is normalised by the sample size n and the squared bandwidth. Because of this normalisation the estimate integrates to one over the study area, so it is a probability density per unit area rather than a count of events. Multiplying by n gives the expected number of events per unit area.
Formula
\hat{f}(x) = \frac{1}{n h_i^2} \sum_{j=1}^{n} K\!\left(\frac{x - x_j}{h_i}\right)The density is evaluated on a fine grid of target locations, producing a continuous raster in which each cell gives the estimated intensity at that location. Grid resolution sets how finely the surface is sampled; the amount of smoothing is controlled by the bandwidths.
The density surface is classified or thresholded to delineate high-density zones (hotspots) and low-density zones (coldspots). The cut-off is chosen by the analyst, and the classified map is descriptive: it does not by itself indicate statistical significance. Overlaying the surface with boundaries, road networks, or population layers helps interpret the concentration pattern.
Common pitfalls
- Using a single fixed bandwidth where the data show strong local clustering. This blurs real hotspots and spreads mass into sparse regions, inflating apparent density there.
- Leaving edge effects uncorrected, which can create artificial low-density zones along the study-area border.
- Reading surface values as absolute event counts. The values are density estimates whose scale depends on the bandwidths and normalisation used, so compare values only within a single analysis.
- Computing densities in geographic coordinates (degrees) instead of a projected planar system, which distorts distances and the units of the density surface.
- Reporting results from a single global h without checking how the surface changes across a range of values.
Frequently asked questions
What is the difference between global KDE and Local KDE?
Global KDE uses a single fixed bandwidth h across the entire study area. Local KDE computes a bandwidth h_i for each location from a pilot density, so the smoothing follows the local point pattern rather than applying one window everywhere.
How do I choose the adaptive bandwidth?
A common approach is a two-step procedure: estimate a pilot density with a fixed bandwidth, then set each local bandwidth in proportion to the inverse square root of the pilot density, as in the bandwidth formula. Plug-in or cross-validation approaches can guide the choice of the global and pilot bandwidths, and the normalisation of the pilot factor should be checked in the software used.
Can Local KDE replace hotspot tests like Getis-Ord Gi*?
No. Local KDE is exploratory and produces a density surface without statistical significance values. Getis-Ord Gi* and similar local spatial statistics provide z-scores and p-values to formally test whether an observed cluster is statistically significant given the spatial distribution of values. Use Local KDE for visualisation and Gi* for inference.
Does the choice of kernel function (Gaussian vs. quartic) matter much?
In practice, the kernel shape usually matters less than the bandwidth, although this is a general pattern rather than a formal result. Different kernel functions usually give similar surfaces at the same bandwidth, so bandwidth selection is the more consequential decision.
How do I handle edge effects at the study-area boundary?
Edge correction methods such as reflection or guard-zone trimming are commonly used. Check whether your software applies an edge correction by default, and report which option was used. If a package offers named correction options, consult its documentation for their exact definitions.
Related methods
Sources
Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman and Hall, London.
ISBN: 978-0412246203Diggle, P. J. (1985). A kernel method for smoothing point process data. Journal of the Royal Statistical Society: Series C (Applied Statistics), 34(2), 138-147.
Open publication reference