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.
Arguments
- param_set
(
ParamSet
).- n
(
integer(1)
)
Number of points to draw randomly.
See also
Other generate_design:
generate_design_grid()
,
generate_design_lhs()
,
generate_design_sobol()
Examples
pset = ps(
ratio = p_dbl(lower = 0, upper = 1),
letters = p_fct(levels = letters[1:3])
)
generate_design_random(pset, 10)
#> <Design> with 10 rows:
#> ratio letters
#> <num> <char>
#> 1: 0.61185242 c
#> 2: 0.17255885 a
#> 3: 0.90944097 b
#> 4: 0.03745117 a
#> 5: 0.59355379 b
#> 6: 0.23697755 a
#> 7: 0.90629727 b
#> 8: 0.81887298 c
#> 9: 0.69982936 c
#> 10: 0.22000033 c