Learn R Programming

tune (version 1.0.0)

parameters.workflow: Determination of parameter sets for other objects

Description

[Deprecated]

These methods have been deprecated in favor of extract_parameter_set_dials().

These methods extend the generic dials::parameters() to work with more complex objects, such as recipes, model specifications, and workflows.

Usage

# S3 method for workflow
parameters(x, ...)

# S3 method for model_spec parameters(x, ...)

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

Value

A parameter set object

Arguments

x

An object

...

Not currently used.

Examples

Run this code
# \donttest{
library(tibble)
library(recipes)

recipe(mpg ~ ., data = mtcars) %>%
  step_impute_knn(all_predictors(), neighbors = tune()) %>%
  step_pca(all_predictors(), num_comp = tune()) %>%
  dials::parameters()

# A peak under the hood
tibble::as_tibble(.Last.value)

recipe(mpg ~ ., data = mtcars) %>%
  step_ns(disp, deg_free = tune("disp df")) %>%
  step_ns(wt, deg_free = tune("wt df")) %>%
  dials::parameters()

recipe(mpg ~ ., data = mtcars) %>%
  step_normalize(all_predictors()) %>%
  dials::parameters()

library(parsnip)

boost_tree(trees = tune(), min_n = tune()) %>%
  set_engine("xgboost") %>%
  dials::parameters()

boost_tree(trees = tune(), min_n = tune()) %>%
  set_engine("C5.0", rules = TRUE) %>%
  dials::parameters()
# }

Run the code above in your browser using DataLab