Learn R Programming

recipes (version 0.1.17)

tunable.step_bs: Find recommended methods for generating parameter values

Description

tunable() determines which parameters in an object can be tuned along with information about the parameters.

Usage

# S3 method for step_bs
tunable(x, ...)

# S3 method for step_corr tunable(x, ...)

# S3 method for step_discretize tunable(x, ...)

# S3 method for step_downsample tunable(x, ...)

# S3 method for step_dummy_multi_choice tunable(x, ...)

# S3 method for step_harmonic tunable(x, ...)

# S3 method for step_ica tunable(x, ...)

# S3 method for step_impute_bag tunable(x, ...)

# S3 method for step_impute_knn tunable(x, ...)

# S3 method for step_impute_mean tunable(x, ...)

# S3 method for step_impute_roll tunable(x, ...)

# S3 method for step_isomap tunable(x, ...)

# S3 method for step_kpca_poly tunable(x, ...)

# S3 method for step_kpca_rbf tunable(x, ...)

# S3 method for step_nnmf tunable(x, ...)

# S3 method for step_ns tunable(x, ...)

# S3 method for step_nzv tunable(x, ...)

# S3 method for step_other tunable(x, ...)

# S3 method for step_pca tunable(x, ...)

# S3 method for step_pls tunable(x, ...)

# S3 method for step_poly tunable(x, ...)

# S3 method for recipe tunable(x, ...)

# S3 method for step tunable(x, ...)

# S3 method for check tunable(x, ...)

# S3 method for step_upsample tunable(x, ...)

# S3 method for step_window tunable(x, ...)

Arguments

x

A recipe, recipe step, or recipe check object

...

Not currently used.

Value

A tibble with a column for the parameter name, information on the default method for generating a corresponding parameter object, the source of the parameter (e.g. "recipe", etc.), and the component within the source. For the component column, a little more specificity is given about the location of the parameter (e.g. "step_normalize" for recipes). The component_id column contains the unique step id field.

Details

These functions define what parameters can be tuned for specific steps. They also define the recommended objects from the dials package that can be used to generate new parameter values and other characteristics.

If the object has no tunable parameters, a tibble with no rows is returned.

The information about the default parameter object takes the form of a named list with an element for the function call and an optional element for the source of the function (e.g. the dials package).

Examples

Run this code
# NOT RUN {
library(recipes)

recipe(mpg ~ ., data = mtcars) %>%
  step_knnimpute(all_predictors()) %>%
  step_pca(all_numeric_predictors()) %>%
  tunable()

recipe(mpg ~ ., data = mtcars) %>%
  step_normalize(all_numeric_predictors()) %>%
  tunable()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab