
An optimised implementation ofGeographically and Temporally Weighted Regression(GTWR). Key achievements:
The work is in its finishing phase. Crime data for Greater London (2011–2019) has been fused with gridded land-surface temperatures. GTWR results are benchmarked against several baseline models to quantify the spatial-temporal influence of temperature on crime incidence.
The relationship between environmental factors and crime patterns has long been a subject of criminological research. Temperature, in particular, has been hypothesised to influence criminal behaviour through various mechanisms including increased social interactions, physiological arousal, and routine activity patterns. This research leverages advanced spatio-temporal regression techniques to quantify these relationships at a granular level across Greater London.
Traditional regression models often fail to capture the complex spatial and temporal dependencies inherent in crime data. Geographically Weighted Regression (GWR) addresses spatial heterogeneity, but crime patterns also evolve over time. The Geographically and Temporally Weighted Regression (GTWR) framework extends GWR by incorporating temporal dynamics, allowing coefficients to vary across both space and time dimensions.
The optimisation process began with profiling the original GTWR implementation from theGWmodelpackage. Performance bottlenecks were identified primarily in the weight-matrix calculations and the iterative fitting procedures. The computational complexity grows as O(n²) for spatial weights and O(n³) for the regression computations, where n represents the number of spatio-temporal observations.
GWmodelR package, achieving up to99.82% speed-up.dask.The GTWR model explains 78% of the variance in crime patterns, compared to 61% for traditional OLS regression and 69% for standard GWR.
| Operation | Original (s) | Optimised (s) | Speed-up |
|---|---|---|---|
| Weight matrix (10k points) | 342.7 | 1.2 | 285.6× |
| Full GTWR fit (50k obs) | 9,847.3 | 68.4 | 144.0× |
| Cross-validation | 29,541.9 | 205.2 | 144.0× |

Python, R, GeoPandas, cuDF, datashader, dask.