This repository contains code, data, and supplementary material for the manuscript “Aligning Validation with Deployment in Spatial Prediction: Target-Weighted Cross-Validation” by Brenning and Suesse. It implements a deployment-oriented framework for performance estimation in spatial prediction, including Target-Weighted Cross-Validation (TWCV) and importance-weighted cross-validation (IWCV). The codebase provides modular components for task generation (random CV, spatial CV, buffered LOO, kNNDM), weighting, and risk estimation, along with simulation experiments and a real-world air-quality (NO₂) case study. The accompanying Supplement document (PDF) presents methodological details and results. The Supplement document is provided under CC-BY, and the code under GPL 3.0. Updated code may be available in the corresponding Github repository at https://github.com/alexanderbrenning/TWCVpaper All results are fully reproducible using the provided R scripts. Data sources and licenses are documented in the Supplement document.
Brenning et al. (Fri,) studied this question.