Description Usage Arguments Value Examples
View source: R/cm_convertInitDesignToGrid.R
This function takes an initial design – with rows being the observations
and columns standing for the dimensions (plus the corresponding objective)
– and adds an additional column to the data.frame
. This additional
column states the cell ID for each observation.
1 | convertInitDesignToGrid(init, lower, upper, blocks)
|
init |
[ |
lower |
[ |
upper |
[ |
blocks |
[ |
[data.frame
].
A data.frame
, which includes an additional column (cell.ID
)
compared to the initial design (init
). The cell.ID
will be a
value between 1 and prod(blocks)
.
1 2 3 4 5 6 7 8 | # (1) create an initial design:
X = t(replicate(n = 200, expr = runif(n = 5, min = -10, max = 10)))
f = function(x) sum(x^2)
y = apply(X = X, MARGIN = 1, FUN = f)
init = data.frame(X, y = y)
# (2) compute the cell mapping grid
convertInitDesignToGrid(init = init, lower = -10, upper = 10, blocks = 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.