Generates a design with randomly drawn points. Internally uses SamplerUnif, hence, also works for ParamSets with dependencies. If dependencies do not hold, values are set to NA in the resulting data.table.

generate_design_random(param_set, n)

Arguments

param_set

:: ParamSet.

n

:: integer(1)
Number of points to draw randomly.

Value

(data.table::data.table()).

See also

Examples

ps = ParamSet$new(list( ParamDbl$new("ratio", lower = 0, upper = 1), ParamFct$new("letters", levels = letters[1:3]) )) generate_design_random(ps, 10)
#> <Design> with 10 rows: #> ratio letters #> 1: 0.01147954 a #> 2: 0.88824957 c #> 3: 0.99634692 c #> 4: 0.50019150 a #> 5: 0.35896702 b #> 6: 0.77491302 c #> 7: 0.58447525 a #> 8: 0.63397637 a #> 9: 0.85866615 a #> 10: 0.56689434 b