tidymodels / tidymodels/spatialsample
unclear error message in `spatial_buffer_vfold_cv()`
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 80
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
I get the below purrr / rsplit error. I've tried a few values of buffer but am unsure what the error actually is in this case.
I suspect there's something wrong with the choice of buffer on this grid.
set.seed(0)
grid <- sf::st_make_grid(cellsize = c(1, 1), offset = c(0, 0), n = c(70, 100))
splits <-spatialsample::spatial_buffer_vfold_cv(
sf::st_sf(grid),
v = 5,
buffer = 100,
radius = NULL
)
Error in `purrr::map()`:
ℹ In index: 1.
Caused by error in `rsplit()`:
! At least one row should be selected for the analysis set.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied R example and start at the spatial_buffer_vfold_cv() entry point, tracing how the buffer and grid produce the rsplit() failure. Done means the same invalid or incompatible buffer situation reports a clear, actionable error instead of the generic purrr/rsplit message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100