generateRandomDesign: Generates a random design for a parameter set.

Description Usage Arguments Value

View source: R/generateRandomDesign.R

Description

The following types of columns are created:

numeric(vector) numeric
integer(vector) integer
discrete(vector) factor (names of values = levels)
logical(vector) logical

If you want to convert these, look at BBmisc::convertDataFrameCols(). For discrete vectors the levels and their order will be preserved, even if not all levels are present.

The algorithm simply calls sampleValues() and arranges the result in a data.frame.

Parameters are trafoed (potentially, depending on the setting of argument trafo); dependent parameters whose constraints are unsatisfied are set to NA entries.

generateRandomDesign 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.)

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 samples from a uniform density over the param space on the UNTRANSFORMED scale, but not necessarily the transformed scale.

Usage

1
generateRandomDesign(n = 10L, par.set, trafo = FALSE)

Arguments

n

(integer(1))
Number of samples in design. Default is 10.

par.set

ParamSet
Parameter set.

trafo

(logical(1))
Transform all parameters by using theirs respective transformation functions. Default is FALSE.

Value

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.


ParamHelpers documentation built on March 26, 2020, 7:40 p.m.