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.30175719       b
#>  2: 0.80175716       a
#>  3: 0.55175716       c
#>  4: 0.05175718       b
#>  5: 0.17675719       c
#>  6: 0.67675716       a
#>  7: 0.42675719       a
#>  8: 0.92675716       b
#>  9: 0.48925719       c
#> 10: 0.98925716       b