
Hill Saturation Step
step_hill_saturation.Rdstep_hill_saturation() creates a specification of a recipe step that will apply the hill saturation transformation to data.
Usage
step_hill_saturation(
recipe,
...,
role = "predictor",
trained = FALSE,
half_saturation = NULL,
shape = 1,
nu = 1,
max_ref = FALSE,
columns = NULL,
skip = FALSE,
id = recipes::rand_id("hill_saturation")
)Arguments
- recipe
A recipe object. The step will be added to the sequence of operations for this recipe.
- ...
One or more selector functions to choose variables for this step. See selections() for more details.
- role
For model terms created by this step, what analysis role should they be assigned? By default, the new columns created by this step from the original variables will be used as predictors in a model.
- trained
A logical to indicate if the quantities for preprocessing have been estimated.
- half_saturation
Half Saturation of the hill saturation transformation
- shape
shape parameter of the hill saturation transformation
- nu
nu parameter
- max_ref
A logical. Should the data be scaled back to the original scale.
- columns
A character string of the selected variable names. This field is a placeholder and will be populated once prep() is used.
- skip
A logical. Should the step be skipped when the recipe is baked by bake()? While all operations are baked when prep() is run, some operations may not be able to be conducted on new data (e.g. processing the outcome variable(s)). Care should be taken when using skip = TRUE as it may affect the computations for subsequent operations.
- id
A character string that is unique to this step to identify it
Value
An updated version of recipe with the new step added to the sequence of any existing operations.
Examples
library(tidymodels)
#> Error in library(tidymodels): there is no package called ‘tidymodels’
library(tidymmm)
data(mmm_imps)
mmm_recipe <-
recipe(kpi_sales ~ mi_tv, data = mmm_imps) |>
step_hill_saturation(mi_tv)
#> Error in recipe(kpi_sales ~ mi_tv, data = mmm_imps): could not find function "recipe"