Closed
Description
Entries in .notes
are dropped in the wrong order in tuning results.
library(tidymodels)
mt_boots <- bootstraps(mtcars, 3, apparent = TRUE)
mt_boots
#> # Bootstrap sampling with apparent sample
#> # A tibble: 4 × 2
#> splits id
#> <list> <chr>
#> 1 <split [32/14]> Bootstrap1
#> 2 <split [32/11]> Bootstrap2
#> 3 <split [32/13]> Bootstrap3
#> 4 <split [32/32]> Apparent
# induce the size zero yardstick error in Bootstrap1
mt_boots$splits[[1]]$out_id <- numeric(0)
mt_res <- fit_resamples(linear_reg(), mpg ~ ., mt_boots)
#> → A | warning: A correlation computation is required, but the inputs are size zero or one and the standard deviation cannot be computed. `NA` will be returned.
#> There were issues with some computations A: x1
#> There were issues with some computations A: x1
#>
mt_res %>% select(id, .notes)
#> # A tibble: 4 × 2
#> id .notes
#> <chr> <list>
#> 1 Apparent <tibble [1 × 3]>
#> 2 Bootstrap1 <tibble [0 × 3]>
#> 3 Bootstrap2 <tibble [0 × 3]>
#> 4 Bootstrap3 <tibble [0 × 3]>
Created on 2023-09-27 with reprex v2.0.2