Skip to contents

Generate a space-filling design using a Sobol sequence. Dependent parameters whose constraints are unsatisfied generate NA entries in their respective columns.

Uses spacefillr::generate_sobol_set.

Note that non determinism is achieved by sampling the seed argument via sample(.Machine$integer.max, size = 1L).

Usage

generate_design_sobol(param_set, n)

Arguments

param_set

(ParamSet).

n

(integer(1))
Number of points to sample.

Value

Design.

See also

Examples

ps = ParamSet$new(list(
  ParamDbl$new("ratio", lower = 0, upper = 1),
  ParamFct$new("letters", levels = letters[1:3])
))

if (requireNamespace("spacefillr", quietly = TRUE)) {
  generate_design_sobol(ps, 10)
}
#> <Design> with 10 rows:
#>          ratio letters
#>  1: 0.64784920       b
#>  2: 0.14784919       c
#>  3: 0.39784920       a
#>  4: 0.89784920       c
#>  5: 0.27284920       b
#>  6: 0.77284920       a
#>  7: 0.02284919       a
#>  8: 0.52284920       c
#>  9: 0.71034920       b
#> 10: 0.21034919       a