Learn R Programming

dials (version 1.3.0)

update.parameters: Update a single parameter in a parameter set

Description

Update a single parameter in a parameter set

Usage

# S3 method for parameters
update(object, ...)

Value

The modified parameter set.

Arguments

object

A parameter set.

...

One or more unquoted named values separated by commas. The names should correspond to the id values in the parameter set. The values should be parameter objects or NA values.

Examples

Run this code
params <- list(lambda = penalty(), alpha = mixture(), `rand forest` = mtry())
pset <- parameters(params)
pset

update(pset, `rand forest` = finalize(mtry(), mtcars), alpha = mixture(c(.1, .2)))

Run the code above in your browser using DataLab