Title: | Space-Filling Design Library |
Version: | 0.1.0 |
Description: | A collection of pre-optimized space-filling designs, for up to ten parameters, is contained here. Functions are provided to access designs described by Husslage et al (2011) <doi:10.1007/s11081-010-9129-8> and Wang and Fang (2005) <doi:10.1142/9789812701190_0040>. The design types included are Audze-Eglais, MaxiMin, and uniform. |
License: | MIT + file LICENSE |
Depends: | R (≥ 2.10), tibble |
Imports: | cli, rlang |
Suggests: | ggplot2, spelling, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Encoding: | UTF-8 |
Language: | en-US |
LazyData: | true |
RoxygenNote: | 7.2.3.9000 |
NeedsCompilation: | no |
Packaged: | 2024-01-08 13:52:12 UTC; max |
Author: | Max Kuhn |
Maintainer: | Max Kuhn <mxkuhn@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-01-08 20:20:02 UTC |
sfd: Space-Filling Design Library
Description
A collection of pre-optimized space-filling designs, for up to ten parameters, is contained here. Functions are provided to access designs described by Husslage et al (2011) doi:10.1007/s11081-010-9129-8 and Wang and Fang (2005) doi:10.1142/9789812701190_0040. The design types included are Audze-Eglais, MaxiMin, and uniform.
Author(s)
Maintainer: Max Kuhn mxkuhn@gmail.com (ORCID)
Retrieve a Space-Filling Design
Description
Obtain a space-filling design (if possible) based on how many characteristics (i.e. parameters) and size (i.e., number of grid points).
Usage
get_design(num_param, num_points, type = "any")
Arguments
num_param |
An integer between two and ten for the number of characteristics/factors/parameters in the design. |
num_points |
An integer for the number of grid points requested. If
there is no corresponding design, an error is given (when using
|
type |
A character string with possible values> |
Details
The "audze_eglais"
, "max_min_l1"
, and "max_min_l2"
designs are from
https://www.spacefillingdesigns.nl/.
The uniform designs were pre-computed using mixtox::unidTab()
using the
method of Wang and Fang (2005) using the C2 criterion.
Value
A tibble (data frame) with columns named X1
to X{num_param}
.
Each column is an integer for the ordered value of the real parameter values.
References
https://www.spacefillingdesigns.nl/, Husslage, B. G., Rennen, G., Van Dam, E. R., & Den Hertog, D. (2011). Space-filling Latin hypercube designs for computer experiments. Optimization and Engineering, 12, 611-630. Wang, Y., & Fang, K. (2005). Uniform design of experiments with mixtures. In Selected Papers Of Wang Yuan, 468-479.
Examples
if (rlang::is_installed("ggplot2")) {
library(ggplot2)
two_param_l2 <- get_design(2, 100, type = "audze_eglais")
ggplot(two_param_l2, aes(X1, X2)) +
geom_point() +
coord_equal()
}
no_design <- try(get_design(2, 1000), silent = TRUE)
cat(as.character(no_design))
Is a Space-Filling Design Available?
Description
Determine if a design from https://www.spacefillingdesigns.nl/ is available in this package based on how many characteristics (i.e. parameters), size (i.e., number of grid points), and type.
Usage
sfd_available(num_param, num_points, type = "any")
Arguments
num_param |
An integer between two and ten for the number of characteristics/factors/parameters in the design. |
num_points |
An integer for the number of grid points requested. If
there is no corresponding design, an error is given (when using
|
type |
A character string with possible values> |
Value
A logical
Examples
sfd_available(2, 10)
sfd_available(2, 10^5)
Space-Filling Designs
Description
This data object is a list of designs originating from https://www.spacefillingdesigns.nl/. While the original website offers no guarantee or license, they do state that "All these designs have been compared and the best designs are collected on this website. They can be downloaded for free and used in your specific simulation environment".
Details
The available designs in this package are for experiments where the number of parameters ranges from two to ten of types "audze_eglais", "max_min_l1", or "max_min_l2". See Husslage et al (2011).
The format is a list with nine elements for dimensions of two to ten experimental factors/parameters. The designs are concatenated with columns of design type and number of points. The values are integers between one and the number of design points.
Value
sfd_lib |
a list of tibble |
Source
https://www.spacefillingdesigns.nl/ Husslage, B. G., Rennen, G., Van Dam, E. R., & Den Hertog, D. (2011). Space-filling Latin hypercube designs for computer experiments. Optimization and Engineering, 12, 611-630.
Examples
data(sfd_lib)
if (rlang::is_installed("ggplot2")) {
library(ggplot2)
two_params <- sfd_lib[[1]]
two_params <- two_params[two_params$num_points == 25,]
ggplot(two_params, aes(X1, X2, col = type)) +
geom_point() +
facet_wrap(~ type, nrow = 1) +
coord_equal()
}
Update the Values of a Design
Description
For a set of values, this function inserts the actual values of the design
produced by get_design()
.
Usage
update_values(design, values)
Arguments
design |
A tibble produced by |
values |
A list of vectors containing the possible values for each
parameter. There should be as many values (of any type) as there are rows in
|
Value
An updated tibble.
Examples
des <- get_design(3, 6)
des
vals <- list(1:6, letters[1:6], seq(20, 21, length.out = 6))
des_2 <- update_values(des, vals)
des_2