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.65854937       b
#>  2: 0.15854934       c
#>  3: 0.90854937       c
#>  4: 0.40854934       a
#>  5: 0.78354937       a
#>  6: 0.28354934       b
#>  7: 0.03354934       b
#>  8: 0.53354937       c
#>  9: 0.34604934       b
#> 10: 0.84604937       c