## ----setup--------------------------------------------------------------------
library(potentiomap)
data("synthetic_wells")
p <- ps_make_points(synthetic_wells[1:16, ], "x", "y", "gw_elevation",
                    "well_id", "EPSG:26916")

## ----validation---------------------------------------------------------------
v <- ps_validate(p, c("IDW", "TPS"), design = "kfold", folds = 3,
                 prediction_mode = "direct", seed = 12)
v$fold_manifest[, c("fold_id", "training_count", "validation_count")]
comparison <- ps_compare_methods(v, metric = "rmse")
comparison$ranking[, c("method", "rmse", "finite_coverage", "rank")]

