Skip to contents

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.

Usage

generate_design_random(param_set, n)

Arguments

param_set

(ParamSet).

n

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

Value

Design.

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.4924163       b
#>  2: 0.2000220       b
#>  3: 0.4143145       c
#>  4: 0.3496620       b
#>  5: 0.6619170       b
#>  6: 0.3660318       b
#>  7: 0.8360426       c
#>  8: 0.6866712       c
#>  9: 0.1180900       c
#> 10: 0.7060250       c