numeric(vector) |
numeric |
integer(vector) |
integer |
discrete(vector) |
factor (names of values = levels) |
convertDataFrameCols
.
Dependent parameters whose constraints are unsatisfied generate NA
entries in their
respective columns.
For discrete vectors the levels and their order will be preserved.The algorithm currently performs these steps:
trafo
);
dependent parameters whose constraints are unsatisfied are set to NA
entries.
Note that if you have trafos attached to your params, the complete creation of the design
(except for the detection of invalid parameters w.r.t to their requires
setting)
takes place on the UNTRANSFORMED scale. So this function creates a regular grid
over the param space on the UNTRANSFORMED scale, but not necessarily the transformed scale.
generateDesign
will NOT work if there are dependencies over multiple levels of
parameters and the dependency is only given with respect to the previous parameter.
A current workaround is to state all dependencies on all parameters involved.
(We are working on it.)
generateGridDesign(par.set, resolution, trafo = FALSE)
ParamSet
]
Parameter set.integer
]
Resolution of the grid for each numeric/integer parameter in par.set
.
For vector parameters, it is the resolution per dimension.
Either pass one resolution for all parameters, or a named vector.logical(1)
]
Transform all parameters by using theirs respective transformation functions.
Default is FALSE
.data.frame
]. Columns are named by the ids of the parameters.
If the par.set
argument contains a vector parameter, its corresponding column names
in the design are the parameter id concatenated with 1 to dimension of the vector.
The result will have an logical(1)
attribute trafo,
which is set to the value of argument trafo
.
ps = makeParamSet(
makeNumericParam("x1", lower = -2, upper = 1),
makeNumericParam("x2", lower = -2, upper = 2, trafo = function(x) x^2)
)
generateGridDesign(ps, resolution = c(x1 = 4, x2 = 5), trafo = TRUE)
Run the code above in your browser using DataLab