Original research models: LGGWR and GRGWR¶
LGGWR and GRGWR are original research implementations. Their documentation includes stronger reporting and sensitivity requirements than a conventional fixed algorithm because their learned geometry or regime structure can depend on initialization and tuning.
LGGWR workflow¶
- Fit standard GWR as a geographic baseline.
- Define contextual attributes that are scientifically available and not outcome proxies.
- Standardize geometry inputs.
- Run multiple restarts.
- Inspect objective history, latent coordinates, metric matrix, and neighbourhood changes.
- Compare held-out prediction and coefficient stability with GWR.
- Report latent dimension, constraints, regularization, learning rate, initialization, and restart variability.
from pygwrx import LGGWR
model = LGGWR(
latent_dim=2,
bandwidth=2.5,
select_bandwidth=False,
n_restarts=3,
random_state=0,
).fit(X, y, coords, attributes)
See the LGGWR handbook and LG-GWR monograph.
GRGWR workflow¶
- Fit GWR and inspect whether coefficient changes appear abrupt rather than smooth.
- Specify a defensible regime-count range.
- Build/verify the spatial-neighbour graph.
- Run multiple initializations.
- Check connectivity, minimum regime size, boundary stability, and convergence.
- Compare regime-conditioned prediction with GWR and simpler regional models.
- Report graph construction, boundary penalty, regime count, random seeds, and sensitivity.
from pygwrx import GRGWR
model = GRGWR(
n_regimes=3,
bandwidth=24,
enforce_connectivity=True,
random_state=0,
).fit(X, y, coords)
See the GRGWR handbook and GR-GWR monograph.