Validate against the POPMAPS 1.03 baseline
Source:R/validate_popmaps_baseline.R
validate_popmaps_baseline.RdRuns a small Hilaria jamesii ancestry probability surface and
compares the result to a frozen POPMAPS 1.03 reference output bundled with
the package. This is intended as a quick scientific regression check before
deeper optimization work changes the modeling internals. The check runs
popmaps() with legacy_compat = TRUE because POPMAPS 1.03 included a
raster-cell indexing artifact that is preserved only for reproducibility.
Usage
validate_popmaps_baseline(tolerance = sqrt(.Machine$double.eps), quiet = FALSE)Value
A data frame with one row per output surface and columns describing
maximum absolute difference, mean absolute difference, NA mismatches, and
pass/fail status. The overall result is stored in the passed attribute.
Examples
validate_popmaps_baseline()
#> POPMAPS 1.03 baseline validation passed.
#> surface n_cell max_abs_diff mean_abs_diff na_mismatch passed
#> 1 hard_boundary 6 0.000000e+00 0.000000e+00 0 TRUE
#> 2 ancestry_probability 6 0.000000e+00 0.000000e+00 0 TRUE
#> 3 axis_1 6 1.734723e-18 6.098637e-19 0 TRUE
#> 4 axis_2 6 2.775558e-17 9.468699e-18 0 TRUE
#> 5 axis_3 6 2.775558e-17 9.396419e-18 0 TRUE