Plugin icon

02SpatialML - Spatial Machine Learning Lab

Plugin ID: 7010

Predictive mapping with machine learning in QGIS: spatial cross-validation designs with distance diagnostics, five models on the same folds, explanations on held-out data, a wall-to-wall prediction with interval and area of applicability, and a replayable model record.

Download latest
Versions JSON
Latest version

02SpatialML carries one predictive-mapping study from samples to a defensible map in one dock panel, with no extra installs.
Data: point or polygon samples with a target field, covariates from the attribute table and from a stack of covariate rasters harmonised onto one grid; distances in metres in a projected working CRS.
Validation design: random k-fold, square or hexagonal spatial blocks, coordinate clusters, buffered leave-one-out and kNNDM, with block size and buffer radius taken from the variogram range, and nearest-neighbour distance curves (sample, prediction and CV) with the Wasserstein distance that show whether the folds mimic the prediction task.
Models: OLS baseline, random forest with quantile regression forest intervals, gradient boosting with split-conformal intervals, GWR and MGWR, tuned by nested cross-validation on the same folds; leaderboard with the optimism gap between spatial and random cross-validation and the residual Moran's I.
Explanations: permutation importance on held-out folds, exact TreeSHAP, partial dependence with ICE curves, accumulated local effects and local GWR / MGWR coefficients.
Prediction: raster or layer prediction with interval bounds and width, the dissimilarity index and the area of applicability mask (Meyer and Pebesma 2021), styled in a layer group.
Record: a self-contained HTML model card with KaTeX formulas and a JSON run manifest that replays the study and checks every hash and metric.
Every engine is implemented in numpy; SciPy and scikit-learn are used when present. Hot spots, LISA, kriging and other learners stay in GeoStats Lab.
Manual: https://geophilo.com/zero2spatialml/

Version QGIS >= QGIS <= Date
0.1.1 - 3.28.0 4.99.0 30 Token 2026-11-16T04:25:36.086649+00:00