View source: R/pre-action-recipe.R
add_recipe | R Documentation |
add_recipe()
specifies the terms of the model and any preprocessing that
is required through the usage of a recipe.
remove_recipe()
removes the recipe as well as any downstream objects
that might get created after the recipe is used for preprocessing, such as
the prepped recipe. Additionally, if the model has already been fit, then
the fit is removed.
update_recipe()
first removes the recipe, then replaces the previous
recipe with the new one. Any model that has already been fit based on this
recipe will need to be refit.
add_recipe(x, recipe, ..., blueprint = NULL)
remove_recipe(x)
update_recipe(x, recipe, ..., blueprint = NULL)
x |
A workflow |
recipe |
A recipe created using |
... |
Not used. |
blueprint |
A hardhat blueprint used for fine tuning the preprocessing. If Note that preprocessing done here is separate from preprocessing that might be done automatically by the underlying model. |
To fit a workflow, exactly one of add_formula()
, add_recipe()
, or
add_variables()
must be specified.
x
, updated with either a new or removed recipe preprocessor.
library(recipes)
library(magrittr)
recipe <- recipe(mpg ~ cyl, mtcars) %>%
step_log(cyl)
workflow <- workflow() %>%
add_recipe(recipe)
workflow
remove_recipe(workflow)
update_recipe(workflow, recipe(mpg ~ cyl, mtcars))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.