-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
featurea feature request or enhancementa feature request or enhancementtidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-dayTidyverse Developer Day rstd.io/tidy-dev-day
Description
In the code below, the tune_grid
function takes a workflow and (inappropriately) a recipe. The code interprets the recipe as going to the ...
and issues an unhelpful warning.
We should see if the ...
contain any of the preprocessor classes and give a better error
library(tidymodels)
set.seed(6735)
folds <- vfold_cv(mtcars, v = 5)
spline_rec <-
recipe(mpg ~ ., data = mtcars) %>%
step_spline_natural(disp, deg_free = tune("disp")) %>%
step_spline_natural(wt, deg_free = tune("wt"))
lin_mod <-
linear_reg() %>%
set_engine("lm")
spline_wflow <- workflow(spline_rec, lin_mod)
spline_grid <- expand.grid(disp = 2:5, wt = 2:5)
spline_res <-
spline_wflow %>%
tune_grid(spline_rec, resamples = folds, grid = spline_grid)
#> Warning: The `...` are not used in this function but one or more objects were
#> passed: ''
Created on 2024-06-24 with reprex v2.1.0
This is probably also true of the other tune functions as well as those in finetune (tidymodels/finetune#114).
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementtidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-dayTidyverse Developer Day rstd.io/tidy-dev-day