set_params {mlr3misc} | R Documentation |
Modify Values of a Parameter Set
Description
Convenience function to modfiy (or overwrite) the values of a paradox::ParamSet.
Usage
set_params(.ps, ..., .values = list(), .insert = TRUE)
Arguments
.ps |
(paradox::ParamSet) |
... |
(any) Named parameter values. |
.values |
( |
.insert |
( |
Examples
if (requireNamespace("paradox")) {
param_set = paradox::ps(a = paradox::p_dbl(), b = paradox::p_dbl())
param_set$values$a = 0
set_params(param_set, a = 1, .values = list(b = 2), .insert = TRUE)
set_params(param_set, a = 3, .insert = FALSE)
set_params(param_set, b = 4, .insert = TRUE)
}
[Package mlr3misc version 0.15.1 Index]