Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evaluateParamExpressions

Evaluates all expressions within a parameter.


Description

Evaluates the expressions of a parameter, parameter set or list of parameters for a given dictionary.

Usage

evaluateParamExpressions(obj, dict = NULL)

Arguments

obj

(Param() | ParamHelpers::ParamSet() | list)
Parameter, parameter set or list of parameter values. Expressions within len, lower or upper boundaries, default or values will be evaluated using the provided dictionary (dict).

dict

(environment | list | NULL)
Environment or list which will be used for evaluating the variables of expressions within a parameter, parameter set or list of parameters. The default is NULL.

Value

Examples

ps = makeParamSet(
  makeNumericParam("x", lower = expression(p), upper = expression(ceiling(3 * p))),
  makeIntegerParam("y", lower = 1, upper = 2)
)
evaluateParamExpressions(ps, dict = list(p = 3))

ps = makeParamSet(
  makeNumericParam("x", default = expression(sum(data$Species == "setosa"))),
  makeIntegerParam("y", lower = 1, upper = 2),
  keys = c("data", "Species")
)
evaluateParamExpressions(ps, dict = list(data = iris))

par.vals = list(
  x = expression(k),
  y = 5
)
evaluateParamExpressions(par.vals, dict = list(k = 3))

ParamHelpers

Helpers for Parameters in Black-Box Optimization, Tuning and Machine Learning

v1.14
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut] (<https://orcid.org/0000-0001-6002-6980>), Michel Lang [aut] (<https://orcid.org/0000-0001-9754-0393>), Jakob Richter [cre, aut] (<https://orcid.org/0000-0003-4481-5554>), Jakob Bossek [aut], Daniel Horn [aut], Karin Schork [ctb], Pascal Kerschke [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.