Check the balance of presences vs pseudoabsences among splits
Source:R/check_split_balance.R
check_splits_balance.Rd
Check the balance of presences vs pseudoabsences among splits
Arguments
- splits
the data splits (an
rset
orsplit
object), generated by a function such asspatialsample::spatial_block_cv()
- .col
the column containing the presences
Value
a tibble of the number of presences and pseudoabsences in the assessment and analysis set of each split (or training and testing in an initial split)
Examples
lacerta_thin <- readRDS(system.file("extdata/lacerta_climate_sf.RDS",
package = "tidysdm"
))
lacerta_cv <- spatial_block_cv(lacerta_thin, v = 5)
check_splits_balance(lacerta_cv, class)
#> # A tibble: 5 × 4
#> presence_assessment pseudoabs_assessment presence_analysis pseudoabs_analysis
#> <int> <int> <int> <int>
#> 1 80 273 33 66
#> 2 80 283 33 56
#> 3 97 272 16 67
#> 4 94 262 19 77
#> 5 101 267 12 72