Geographically Weighted Principal Component Analysis (GWPCA)
Also known as: Local PCA, Spatially Adaptive PCA, Geographically Weighted Factor Analysis, Yerel Coğrafi Ağırlıklı PCA
Geographically Weighted Principal Component Analysis (GWPCA) is a local dimensionality-reduction method introduced by Harris, Brunsdon, and Charlton in 2011. It extends classical PCA by fitting a separate weighted PCA at every location in a dataset, allowing eigenstructures — the principal components and their loadings — to vary continuously across geographic space rather than being constrained to a single global solution. GWPCA is suited to researchers in environmental science, public health, and regional economics who suspect that multivariate relationships among variables differ by location.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use GWPCA when you have georeferenced multivariate data and suspect that the dominant patterns of covariation differ across the study area — for instance, if pollution drivers in urban zones differ from those in rural zones. The method assumes the data are continuously distributed over space and that a meaningful spatial kernel can be defined. It is not appropriate for non-spatial tabular data, for very small samples (fewer observations than variables near any location), or when spatial stationarity has been confirmed. If the goal is prediction rather than structure discovery, Geographically Weighted Regression may be more appropriate.
Strengths & limitations
- Reveals spatial non-stationarity in multivariate structure that global PCA conceals
- Produces interpretable maps of local loadings and eigenvalues for every variable and component
- Does not require a predefined spatial model or parametric distributional assumptions
- Bandwidth selection via cross-validation or AIC provides a principled, data-driven tuning procedure
- Computationally expensive: a full eigendecomposition is performed at every calibration location
- Local component sign indeterminacy makes spatial comparison of eigenvectors non-trivial without alignment steps
- Bandwidth selection can be sensitive to the choice of kernel function and distance metric
- Interpretation is challenging when local eigenstructures vary strongly, as there is no single summary loading matrix
Frequently asked
How do I choose the bandwidth for GWPCA?
The standard approach is to minimize a cross-validation (CV) score or the corrected Akaike Information Criterion (AICc) over a grid of candidate bandwidths. For adaptive kernels the bandwidth is expressed as a number of nearest neighbors rather than a fixed distance, which helps in datasets with uneven spatial sampling density. The GWmodel package in R automates both fixed and adaptive bandwidth selection.
How do I compare local principal components across locations when eigenvector signs can flip?
Local eigenvectors are only defined up to a sign change, so a raw map of loadings may show spurious sign reversals. The recommended practice is to apply a sign-alignment convention — for example, constrain the largest-magnitude loading of each local eigenvector to be positive — before mapping. Some implementations in GWmodel include this alignment by default, but it should always be verified.
Can GWPCA be used with non-Euclidean or network distances?
Yes, in principle. The spatial kernel requires only a symmetric distance matrix, so road-network distance or great-circle distance on a sphere can replace Euclidean distance. However, standard bandwidth-selection routines assume Euclidean space, so custom implementations may be needed when using non-Euclidean metrics. Computational cost also increases substantially with precomputed distance matrices for large datasets.
Sources
- Harris, P., Brunsdon, C., & Charlton, M. (2011). Geographically weighted principal components analysis. International Journal of Geographical Information Science, 25(10), 1717–1736. DOI: 10.1080/13658816.2011.554838 ↗
How to cite this page
ScholarGate. (2026, June 2). Geographically Weighted Principal Component Analysis (GWPCA). ScholarGate. https://scholargate.app/en/spatial-analysis/geographically-weighted-pca
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Geographically Weighted Random ForestSpatial analysis↔ compare
- Geographically Weighted RegressionSpatial analysis↔ compare