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.65375727       c
#>  2: 0.15375724       b
#>  3: 0.90375727       a
#>  4: 0.40375724       c
#>  5: 0.77875727       b
#>  6: 0.27875724       a
#>  7: 0.02875725       c
#>  8: 0.52875727       b
#>  9: 0.09125725       a
#> 10: 0.59125727       c