Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle "class"-like outcome names and levels #126

Merged
merged 4 commits into from
May 4, 2022
Merged

Conversation

simonpcouch
Copy link
Collaborator

Closes #125.

library(tidymodels)
library(stacks)

x <- tibble::tibble(
  class = sample(c("class_1", "class_2"), 100, replace = TRUE),
  a = rnorm(100),
  b = rnorm(100)
)

res <- tune_grid(
  logistic_reg(engine = 'glmnet', penalty = tune(), mixture = 1),
  preprocessor = recipe(class ~ ., x),
  resamples = vfold_cv(x, 2),
  grid = 2,
  control = control_stack_grid()
)

stacks() %>%
  add_candidates(res)
#> # A data stack with 1 model definition and 1 candidate member:
#> #   res: 1 model configuration
#> # Outcome: class (factor)

Created on 2022-05-03 by the reprex package (v2.0.1)

@github-actions
Copy link

This pull request 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.

@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handling columns called class
1 participant