`step_select_boruta` creates a *specification* of a recipe step that selects a subset of predictors using the Boruta feature selection approach.
A recipe object. The step will be added to the sequence of operations for this recipe.
One or more selector functions to choose which variables are affected by the step. See selections() for more details. For the tidy method, these are not currently used.
A character string with the name of the response variable to use to calculate the feature importance scores.
Not used by this step since no new variables are created.
A logical to indicate if the quantities for preprocessing have been estimated.
A character vector of predictor names that will be removed from the data. This will be set when `prep()` is used on the recipe and should not be set by the user.
A list of options to pass to `Boruta::Boruta()`. The defaults use Boruta's defaults. *Note* that `x` and `y` should not be passed here.
The `Boruta::Boruta` object is stored here once this preprocessing step has been trained by `prep.recipe()`.
A logical. Should the step be skipped when the recipe is baked by bake.recipe()? While all operations are baked when prep.recipe() 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.
A character string that is unique to this step to identify it.
A `step_select_boruta` object.
a `step_select_boruta` object.
library(recipes)
library(parsnip)
# load the example iris dataset
data(cells, package = "modeldata")
# create a preprocessing recipe
rec <-
recipe(class ~ ., data = cells[, -1]) %>%
step_select_boruta(all_predictors(), outcome = "class")
prepped <- prep(rec)
preproc_data <- juice(prepped)
prepped
#> Recipe
#>
#> Inputs:
#>
#> role #variables
#> outcome 1
#> predictor 56
#>
#> Training data contained 2019 data points and no missing data.
#>
#> Operations:
#>
#> Boruta feature selection (5 excluded)