Skip to content

tidy method for bootstraps is incorrect #115

Closed

Description

@topepo

Thanks @apreshill

library(tidymodels)
#> Registered S3 method overwritten by 'xts':
#>   method     from
#>   as.zoo.xts zoo
#> ── Attaching packages ────────────────────────────────────────────── tidymodels 0.0.3 ──
#> ✔ broom     0.5.2            ✔ purrr     0.3.3       
#> ✔ dials     0.0.4            ✔ recipes   0.1.7.9002  
#> ✔ discrim   0.0.1            ✔ rsample   0.0.5       
#> ✔ dplyr     0.8.3            ✔ tibble    2.99.99.9010
#> ✔ ggplot2   3.2.1            ✔ tune      0.0.0.9004  
#> ✔ infer     0.5.1            ✔ yardstick 0.0.4       
#> ✔ parsnip   0.0.4.9000
#> ── Conflicts ───────────────────────────────────────────────── tidymodels_conflicts() ──
#> ✖ purrr::discard()  masks scales::discard()
#> ✖ dplyr::filter()   masks stats::filter()
#> ✖ dplyr::lag()      masks stats::lag()
#> ✖ ggplot2::margin() masks dials::margin()
#> ✖ recipes::step()   masks stats::step()

set.seed(352)
tmp <- bootstraps(iris[1:30,], times = 1) %>% tidy(unique_ind = FALSE) 
sum(tmp$Data == "Analysis") # should be 30
#> [1] 20
sum(tmp$Data == "Assessment") # should be about 30 * exp(-1) ~~ 11
#> [1] 10

Created on 2019-12-06 by the reprex package (v0.3.0)

Activity

  1. github-actions commented on Feb 22, 2021

    @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.

  2. locked and limited conversation to collaborators on Feb 22, 2021
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

    tidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-day

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions