Find your next learning step
A model can calculate a soil prediction everywhere while having evidence for only part of the map. An area-of-applicability mask makes that boundary visible before a smooth surface is mistaken for measured knowledge.
Open the chapter contents · Soil Science root · Gold Standard of Education · How X Works
Chapter contents
Choose the route closest to the question, or read from Chapter 1 for the complete argument. The teaching chapters remain open; these grouped routes form the index.
Route 1 · Define similarity
Route 2 · Work the mask
Route 3 · Stress the map
Route 4 · Check limits and evidence
Route 5 · Ask and continue
CHAPTER 1 OF 12 · DEFINE SIMILARITY
1. A prediction surface can extend beyond its evidence
A digital soil model can return a value for every raster cell because its algorithm is mathematically defined everywhere. That does not mean the training data cover every combination of climate, terrain, geology, land use and remote-sensing covariates on the map.
The area of applicability, or AOA, marks cells whose predictor combinations are sufficiently similar to the conditions represented during model assessment. Outside it, the model is extrapolating in multivariate predictor space even if the cell lies between sampled coordinates.
This guide extends the Soil Science root, spatial cross-validation and spatial conformal prediction. Cross-validation asks how a model transfers under a resampling design; AOA asks where that evidence is relevant.
CHAPTER 2 OF 12 · DEFINE SIMILARITY
2. Dissimilarity is multivariate, scaled and weighted
Raw Euclidean distance is misleading when predictors use different units. Standardize each predictor using training-data statistics, then weight variables so that influential predictors contribute appropriately. For a new cell, calculate its weighted distance to the nearest training observation or, in cross-validation, to the nearest observation available to that held-out fold.
Meyer and Pebesma define a unitless dissimilarity index by scaling this nearest-neighbour distance relative to typical dissimilarities in the training data. A threshold derived from held-out training situations then separates cells inside and outside the AOA.
The method detects novel combinations, not just values beyond each variable’s minimum and maximum. A cell can be inside every univariate range yet outside the cloud of combinations actually observed.
CHAPTER 3 OF 12 · WORK THE MASK
3. Worked example: one cell and three predictors
Suppose standardized predictors are clay proxy z1, wetness index z2 and elevation z3. A query cell has z = (1.2, 0.8, -0.3). Its nearest training cell has z = (0.4, 0.6, -0.1). Use normalized importance weights 0.5, 0.3 and 0.2.
| Predictor | Query z | Nearest training z | Difference | Weight | Weighted squared difference |
|---|---|---|---|---|---|
| Clay proxy | 1.2 | 0.4 | 0.8 | 0.5 | 0.320 |
| Wetness index | 0.8 | 0.6 | 0.2 | 0.3 | 0.012 |
| Elevation | -0.3 | -0.1 | -0.2 | 0.2 | 0.008 |
The weighted squared distance is 0.340, so the distance is square root 0.340 = 0.583. If the reference mean nearest-neighbour dissimilarity is 0.350, the illustrative index is 0.583 / 0.350 = 1.67. If the cross-validation-derived threshold is 1.10, this cell lies outside the AOA.
The number 1.67 is not a probability or an error magnitude. It says that this predictor combination is substantially more dissimilar than the reference scale used by the workflow.
CHAPTER 4 OF 12 · WORK THE MASK
4. The threshold must match the validation design
Random cross-validation often leaves a nearby, nearly identical observation in the training fold. That can make held-out dissimilarities too small and the resulting AOA too permissive for spatial transfer. If the intended prediction is to unsampled regions, derive weights, errors and dissimilarity thresholds using spatially separated folds that reflect that task.
All preprocessing belongs inside the resampling loop when it learns from data: imputation, scaling, variable selection and importance estimation. Leakage makes both validation error and AOA boundaries look more confident than they are.
Record how the threshold was chosen. A maximum held-out dissimilarity has a clear interpretation but can be controlled by one extreme fold. A robust quantile may be more stable but deliberately excludes some assessed conditions. The choice changes the map and must be justified.
CHAPTER 5 OF 12 · WORK THE MASK
5. A four-cell mask makes the decision visible
Consider four mapped cells evaluated under a threshold of 1.10.
| Cell | Dissimilarity index | AOA status | Prediction shown? | Interpretation |
|---|---|---|---|---|
| Valley-1 | 0.42 | Inside | Yes | Well represented combination |
| Slope-2 | 0.88 | Inside | Yes | Less similar but assessed range |
| Plateau-3 | 1.16 | Outside | Flag or mask | Mild extrapolation beyond threshold |
| Mine-4 | 1.67 | Outside | Flag or mask | Strongly novel combination |
Store both the continuous index and the binary mask. The index reveals gradients and sensitivity near the boundary; the mask supports clear communication. A hard threshold should not erase the difference between 1.11 and 4.00.
The map product can hide outside-AOA predictions, display them with hatching, or publish them in a separate layer. The correct choice depends on whether users could mistake an extrapolation for a validated estimate.
CHAPTER 6 OF 12 · STRESS THE MAP
6. Nearest in geography is not nearest in predictors
A point one kilometre away can have different parent material, drainage and management. Conversely, a distant site may share a nearly identical predictor profile. AOA operates primarily in the chosen predictor space, while spatial validation controls geographic dependence and transfer distance.
Use both. Map geographic distance to samples alongside dissimilarity, particularly when important soil-forming factors are missing from the predictor stack. A low dissimilarity index cannot compensate for an unmeasured boundary such as a sharp lithological change.
The transfer question is: which kinds of closeness make the training example informative for this cell—covariate similarity, geographic proximity, process similarity, or all three?
CHAPTER 7 OF 12 · STRESS THE MAP
7. Changed context: a new categorical class appears
Suppose a geological class occurs in the mapping area but never in training. Ordinary one-hot encoding may place it in a novel category that the fitted model cannot process or silently maps to an “other” level. The AOA workflow should flag the unsupported class before distance calculations create a false sense of comparability.
Rare levels also require care. A class represented once may technically be present yet provide no stable evidence for transfer. Report class frequencies and consider grouping only when the merged category has a defensible soil-process meaning.
If a future sensor changes units or calibration, recompute predictors through the full frozen preprocessing pipeline. Distribution shift caused by measurement change is not ecological novelty, but it can invalidate the same model.
CHAPTER 8 OF 12 · STRESS THE MAP
8. Changed context: correlated predictors and unstable importance
Highly correlated predictors can double-count one environmental gradient. Permutation importance can be unstable because one correlated variable substitutes for another. AOA boundaries may shift when the model or random seed changes even though the scientific information is similar.
Audit alternative defensible predictor sets, grouped importance or dimension reduction. Compare masks, not only prediction accuracy. If small modelling changes produce large AOA changes, publish that instability as an uncertainty layer or conservative union/intersection analysis.
Do not choose weights merely to enlarge coverage. Predictor weighting is part of the evidence model and should be learned or specified before viewing which farms or districts fall outside.
CHAPTER 9 OF 12 · CHECK LIMITS AND EVIDENCE
9. Limits and common misconceptions
Inside the AOA does not guarantee an accurate prediction for an individual cell. It means the cell resembles conditions under which the model’s assessment is considered applicable. Local measurement error, missing predictors and process changes can still cause failure.
Outside the AOA does not prove the prediction is wrong. It means validation evidence does not support the usual error claim there. New field sampling can convert an extrapolation into an assessed region.
AOA is model- and workflow-specific. Change the predictor set, weights, preprocessing, training data or resampling design and the mask should be recomputed. It is not a permanent property of the landscape.
CHAPTER 10 OF 12 · CHECK LIMITS AND EVIDENCE
10. Evidence and reproducibility route
Meyer and Pebesma introduce the dissimilarity-index and AOA framework in Predicting into unknown space? Estimating the area of applicability of spatial prediction models. Roberts and colleagues explain why resampling must match spatial transfer in Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure.
A reproducible package preserves training coordinates, response and predictor values, raster versions, categorical-level maps, preprocessing code, fold assignments, importance weights, distance definition, normalization constant, threshold rule, continuous dissimilarity raster, binary AOA mask and software versions. Re-run the pipeline after any training expansion rather than patching the old mask manually.
CHAPTER 11 OF 12 · ASK AND CONTINUE
11. Frequently asked questions
Is the dissimilarity index a probability that the prediction is wrong?
No. It is a relative predictor-space distance. Error probabilities require a separate calibrated uncertainty model and compatible assumptions.
Why not mask cells outside each predictor’s range?
Univariate ranges miss novel combinations. A cell can be individually ordinary on every variable but jointly unlike anything in training.
Should outside-AOA cells be deleted?
Usually preserve them in a flagged layer. Masking the public decision layer can prevent misuse, while retained values support diagnosis and future sampling.
Can new samples improve the AOA?
Yes, if they genuinely cover novel combinations and are incorporated into a newly assessed model. Strategic sampling can target high-dissimilarity regions.
CHAPTER 12 OF 12 · ASK AND CONTINUE
12. Final transfer check and connected reading
Before publishing an AOA map, answer six questions: Does the validation split represent the intended transfer? Were preprocessing and weights learned without leakage? Are categorical novelties explicit? Is the continuous index preserved? How stable is the mask to defensible predictor choices? Can users distinguish “outside evidence” from “known wrong”?
Continue through the Soil Science root, spatial cross-validation, spatial conformal prediction, the Gold Standard of Education and the How X Works hub. The transferable skill is to separate a model’s computational reach from the region where its error evidence applies.
Top · Contents · Previous · How X Works