Skip to content

[Deprecated]

This function has been deprecated; please use hardhat::extract_parameter_dials() instead.

pull_dials_object() can extract a single dials parameter object from different types of objects (e.g. parameter sets, recipes, etc.).

Usage

pull_dials_object(x, id, ...)

# S3 method for parameters
pull_dials_object(x, id, ...)

# S3 method for recipe
pull_dials_object(x, id, ...)

# S3 method for model_spec
pull_dials_object(x, id, ...)

# S3 method for workflow
pull_dials_object(x, id, ...)

Arguments

x

The results of a call to parameters(), a recipe, model specification, or workflow.

id

A single string for the id of the parameter.

...

Not currently used.

Value

A dials parameter object.

Examples

glmn_param <- parameters(lambda = penalty(), mixture())
pull_dials_object(glmn_param, "lambda")
#> Warning: `pull_dials_object()` was deprecated in dials 0.1.0.
#>  Please use `hardhat::extract_parameter_dials()` instead.
#> Amount of Regularization (quantitative)
#> Transformer: log-10 [1e-100, Inf]
#> Range (transformed scale): [-10, 0]

# fails:
# pull_dials_object(glmn_param, "penalty")
# ->
extract_parameter_dials(glmn_param, "lambda")
#> Amount of Regularization (quantitative)
#> Transformer: log-10 [1e-100, Inf]
#> Range (transformed scale): [-10, 0]