Collects predictions from all CV folds at each test location, computes per-location mean and standard deviation, and provides a spatial uncertainty map.
Usage
borg_prediction_map(data, folds, formula, coords, fit_fun = stats::lm)Value
A data frame with class "borg_pred_map" containing:
- x, y
Coordinates
- pred_mean
Mean prediction across folds where this obs was in test set
- pred_sd
SD of predictions (uncertainty)
- actual
Observed target value
- residual_mean
Mean residual
- n_folds_tested
Number of folds where this obs appeared in test set