parameters.workflow: Determination of parameter sets for other objects

View source: R/param_set.workflows.R

parameters.workflowR Documentation

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 class 'workflow'
parameters(x, ...)

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

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

Arguments

x

An object

...

Not currently used.

Value

A parameter set object

Examples


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



tune documentation built on July 8, 2022, 1:08 a.m.