You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm setting up a nested cross-validation using spatial block cross-validation for outer folds and cluster cross-validation for inner folds. Interaction between these two types of cross-validations gives me the following error:
library(spatialsample)
library(rsample)
folds <- spatialsample::spatial_block_cv(boston_canopy, v = 3)
rsample::nested_cv(boston_canopy, outside = folds, inside = rsample::clustering_cv(v = 3, repeats = 1, vars = c('mean_temp','mean_heat_index_morning')))
#> Error in `map()`:
#> ℹ In index: 1.
#> Caused by error in `dist()`:
#> ! 'list' object cannot be coerced to type 'double'
The behavior that I'm trying to achieve is shown here:
This example uses data from the spatialsample package. I've opened the issue in rsample because the error message seems to be related to how rsample::nested_cv interacts with the output of spatial_block_cv.
The text was updated successfully, but these errors were encountered:
I'm setting up a nested cross-validation using spatial block cross-validation for outer folds and cluster cross-validation for inner folds. Interaction between these two types of cross-validations gives me the following error:
The behavior that I'm trying to achieve is shown here:
This example uses data from the
spatialsample
package. I've opened the issue inrsample
because the error message seems to be related to howrsample::nested_cv
interacts with the output ofspatial_block_cv
.The text was updated successfully, but these errors were encountered: