Skip to content

entries in .notes don't match the resample id they ought to #728

Closed

Description

@simonpcouch

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

Activity

  1. added
    bugan unexpected problem or unintended behavior
    on Sep 27, 2023
  2. github-actions commented on Oct 21, 2023

    @github-actions
    Contributor

    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.

  3. locked and limited conversation to collaborators on Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions