GWRBoost: Geographically Weighted XGBoost
- GWRBoost is a spatially adaptive ensemble that combines locally weighted regressions through stagewise boosting to model nonstationary spatial relationships.
- It iteratively updates local models using pseudo-residuals and spatial kernels, enhancing flexibility and reducing underfitting compared to classical one-step GWR.
- Empirical studies show GWRBoost improves metrics like RMSE, AICc, and R² while preserving interpretability through analytical model complexity and hat matrix tracking.
Geographically Weighted XGBoost (GW-XGBoost), referred to as GWRBoost in published literature, generalizes the framework of geographically weighted regression (GWR) using a stagewise gradient boosting approach for the estimation of spatially-varying relationships. Unlike classical GWR, which fits spatially localized linear regressions in a single step, GWRBoost iteratively fits and combines multiple locally weighted linear regressions at each geographic location, thereby improving model flexibility and reducing underfitting without sacrificing interpretability. This approach is particularly well-suited for spatial data where underlying relationships between predictors and responses exhibit nonstationarity. Through analytical tracking of model complexity via the hat matrix, GWRBoost maintains quantitative explainability for spatial variation, enabling rigorous model comparison using criteria such as AIC and AICc (Wang et al., 2022).
1. Model Architecture and Loss Objective
GWRBoost operates on a data set , where is the predictor vector for observation , the response, and the spatial location. The underlying model is an additive ensemble:
with each a localized weighted linear regression (GWR) centered at . Fitting is accomplished by minimizing the globally weighted squared-error loss,
where and weights 0 use a spatial kernel 1 and bandwidth 2. Typical kernels include the bisquare 3 for 4 and Gaussian 5.
2. Stagewise Gradient Boosting with Spatial Locality
At each boosting iteration 6, GWRBoost performs the following steps for each location 7:
- Residual Computation: Calculate the pseudo-residual
8
- Local Model Fitting: Fit a GWR at 9 to 0 using spatial weights 1. The local fit is
2
with 3 estimated via weighted least squares.
- Ensemble Update: The ensemble prediction at 4 is updated,
5
where 6 is a learning rate.
If tree-based base learners are desired (the XGBoost style), the model solves a regularized, weighted tree-boosting objective at each step with additional regularization on tree complexity, though in GWRBoost the default base learners are locally weighted linear regressions.
3. Model Complexity and Model Selection Criteria
To enable comparison with other regression models within the AIC/AICc framework, GWRBoost calculates the effective degrees of freedom as the trace of the overall hat matrix after 7 boosting steps:
8
where 9 is the hat matrix of a single-step GWR. The predicted response is
0
with
1
Model fit is assessed through the Gaussian log-likelihood, and the information criteria are computed as
2
3
This analytic tractability preserves transparency in model selection and regularization.
4. Kernel, Bandwidth, and Hyperparameter Optimization
Kernel and bandwidth selection critically influence the degree of locality. The two canonical kernel types in GWRBoost are:
| Kernel | Weight Formula | Support |
|---|---|---|
| Bisquare | 4 | 5 |
| Gaussian | 6 | 7 |
The bandwidth 8 is typically selected by minimizing AICc (or a cross-validation score) using grid or golden-section search. Empirically, GWRBoost benefits from bandwidth inflation, commonly setting 9 with 0, to counteract local overfitting. Regularization is controlled by the learning rate 1 (often 2–3) and the number of boosting iterations 4, with early stopping determined via validation AICc or 5.
5. Algorithmic Workflow
The procedural logic of GWRBoost is as follows:
- Initialization: Set 6 for all 7.
- Boosting Loop (8 to 9): For each location 0:
- Compute residuals: 1.
- Fit local GWR at 2 to residuals 3, using 4.
- Form 5.
- Update 6.
Degrees-of-Freedom Calculation: After boosting, compute 7 and 8.
The central distinction from standard GWR is the ensembling over 9 steps; classical GWR fits a single local model per site.
6. Computational Complexity and Empirical Performance
The computational complexity of GWRBoost is dominated by 0, with each local GWR requiring 1 operations, and the hat matrix tracking 2 storage naively. Simulation experiments on a 3 grid (4) show that GWRBoost achieves 18.3% lower RMSE in coefficient estimation and a 67.3% reduction in AICc (GWRBoost 5, GWR 6). Moran's I of residuals is near zero for GWRBoost, indicating negligible spatial autocorrelation, compared to GWR's 7.
In an empirical study on New York City census blocks (8, 9):
| Evaluation Metric | GWRBoost | GWR | Relative Change |
|---|---|---|---|
| RSS | 261.5 | 388.6 | 032.7% |
| AICc | 2437.5 | 3315.6 | 126.5% |
| 2 | 0.882 | 0.825 | 36.9% |
| Moran's 4 (residuals) | 5 | 6 | Lower: random |
These results demonstrate substantial improvements in estimation accuracy, model fit, and residual independence compared to single-step GWR.
7. Comparisons with GWR and XGBoost Paradigms
GWRBoost synthesizes concepts from GWR and gradient boosting. Key distinctions include:
| Aspect | GWRBoost | GWR | XGBoost-Style Trees |
|---|---|---|---|
| Base Learner | Local weighted linear regression | Local linear | Decision/regression trees |
| Model Fitting | Boosting-style (sequential) | One-shot per site | Boosting-style (sequential) |
| Spatial Weights | At every step | Once | Not standard |
| Analytical AICc/Hat Matrix | Yes | Yes | Not typically analytical |
A salient feature is that GWRBoost achieves near-global optimality for the weighted squared-error/AICc criterion while preserving interpretability through explicit local coefficient estimates. If tree-based learners are substituted for the local regression base learners, the algorithm approaches a spatially weighted variant of XGBoost, but would forfeit the closed-form quantification of spatial relationship variation inherent to the GWR approach (Wang et al., 2022).
In summary, GWRBoost extends the GWR paradigm to higher-dimensional and more complex spatial data, providing state-of-the-art performance in spatial regression tasks while remaining analytically transparent, particularly in model selection and interpretation.