tidymodels / spatialsample

Create and summarize spatial resampling objects 🗺
https://spatialsample.tidymodels.org
Other
71 stars 5 forks source link

`spatial_buffer_vfold_cv()` should handle `repeats` better #119

Closed mikemahoney218 closed 2 years ago

mikemahoney218 commented 2 years ago

See #115

spatial_buffer_vfold_cv() can be deterministic (if v is equal to nrow(data), or NULL, or Inf) and we'd probably want to error there as well (although, that's starting to get into the realm of "if you found this edge case, you were doing something weird on purpose")

mikemahoney218 commented 2 years ago
library(spatialsample)

spatial_buffer_vfold_cv(
  boston_canopy, 
  v = 2, 
  buffer = 1, 
  radius = NULL, 
  repeats = 2
)
#> #  2-fold spatial cross-validation 
#> # A tibble: 4 × 2
#>   splits           id   
#>   <list>           <chr>
#> 1 <split [20/341]> Fold1
#> 2 <split [19/341]> Fold2
#> 3 <split [30/341]> Fold3
#> 4 <split [31/341]> Fold4
github-actions[bot] commented 1 year ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.