tidymodels / themis

Extra recipes steps for dealing with unbalanced data
https://themis.tidymodels.org/
Other
141 stars 11 forks source link

Argument not passed correctly for deprecated arguments #90

Closed EmilHvitfeldt closed 2 years ago

EmilHvitfeldt commented 2 years ago

This affects step_upsample() and step_downsample(). Reported by https://github.com/ttrodrigz in https://github.com/tidymodels/embed/pull/118#issuecomment-1098081759

library(tidymodels)
library(themis)

mt <-
  mtcars %>%
  as_tibble() %>%
  mutate(am = factor(am))

set.seed(1)
samp <- bootstraps(mt, times = 3, strata = am)

rec <-
  mt %>%
  recipe(am ~ mpg, data = .) %>%
  step_downsample(am, under_ratio = tune())

spec <- logistic_reg()

wf <- workflow(rec, spec)

tuned <- tune_grid(
  object = wf,
  resamples = samp,
  grid = tibble(under_ratio = seq(1, 1.5, by = 0.1)),
  metrics = metric_set(roc_auc)
)
github-actions[bot] commented 2 years ago

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.