Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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().

Value

See Also

Other generate_design: generate_design_grid(), generate_design_random()

Examples

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

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

paradox

Define and Work with Parameter Spaces for Complex Algorithms

v0.7.1
LGPL-3
Authors
Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), Bernd Bischl [aut] (<https://orcid.org/0000-0001-6002-6980>), Jakob Richter [aut] (<https://orcid.org/0000-0003-4481-5554>), Xudong Sun [aut] (<https://orcid.org/0000-0003-3269-2307>), Martin Binder [aut], Marc Becker [ctb] (<https://orcid.org/0000-0002-8115-0400>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.