Learn R Programming

paradox (version 1.0.1)

generate_design_lhs: Generate a Space-Filling LHS Design

Description

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

Usage

generate_design_lhs(param_set, n, lhs_fun = NULL)

Value

Design.

Arguments

param_set

(ParamSet).

n

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

lhs_fun

(function(n, k))
Function to use to generate a LHS sample, with n samples and k values per param. LHS functions are implemented in package lhs, default is to use lhs::maximinLHS().

See Also

Other generate_design: generate_design_grid(), generate_design_random(), generate_design_sobol()

Examples

Run this code
pset = ps(
  ratio = p_dbl(lower = 0, upper = 1),
  letters = p_fct(levels = letters[1:3])
)

if (requireNamespace("lhs", quietly = TRUE)) {
  generate_design_lhs(pset, 10)
}

Run the code above in your browser using DataLab