Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tunable.recipe

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 class 'recipe'
tunable(x, ...)

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

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

Arguments

x

A recipe, recipe step, or recipe check object

...

Not currently used.

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).

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.

Examples

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()

recipes

Preprocessing Tools to Create Design Matrices

v0.1.16
MIT + file LICENSE
Authors
Max Kuhn [aut, cre], Hadley Wickham [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.