labsimplex {labsimplex} | R Documentation |
Generates a simplex object
Description
The simplex (a list with class smplx
) contains the coordinates
of the n+1 vertices that define a simplex in an n-dimensional space.
By default, the function produces a regular simplex centered at the origin.
The coordinates of the regular simplex are transformed into the real
variables space by using the information of the start or centroid and
step-size. The only non-optional parameter is n
that relates the
simplex dimensionality. Once the simplex
is generated, the experiments under the conditions indicated for each
variable at each vertex must be carried and the response obtained.
Those responses are assigned to the smplx
object at the moment of
generating the new vertex (see generateVertex
).
Usage
labsimplex(n, start = NULL, centroid = NULL, stepsize = NULL,
usrdef = NULL, var.name = NULL)
Arguments
n |
dimensionality of the simplex (i.e. number of variables) |
start |
numeric vector of size |
centroid |
numeric vector of size |
stepsize |
numeric vector of size |
usrdef |
|
var.name |
vector containing the names for the variables |
Details
The regular simplex coordinates are generated following the general
algorithm for the cartesian coordinates of a regular n-dimensional simplex.
This algorithm considers that all vertices must be equally distanced from
simplex centroid and all angles subtended between any two vertexes and the
centroid of a simplex are equal to arccos(-1/n).
If the vertexes coordinates are manually given (in usr.def
parameter), the function checks if the faces produced belong to different
hyperplanes. This avoids the generation of a degenerated simplex.
Value
An object of class smplx
with the information of the new
simplex.
Author(s)
Cristhian Paredes, craparedesca@unal.edu.co
Jesús Ágreda, jagreda@unal.edu.co
References
Nelder, J. A., and R. Mead. 1965. “A Simplex Method for Function Minimization.” The Computer Journal 7 (4): 308–13.
Spendley, W., G. R. Hext, and F. R0. Himsworth. 1962. “Sequential Application of Simplex Designs in Optimization and Evolutionary Operation.” Technometrics 4 (4): 441–61.
Examples
simplex <- labsimplex(n = 3)
simplex <- labsimplex(n = 3, centroid = c(350, 7, 0.4),
stepsize = c(35, 2, 0.3),
var.name = c('temperature', 'pH', 'concentration'))
simplex <- labsimplex(n = 3, usrdef = rbind(c(390, 8, 0.2), c(330, 8, 0.2),
c(330, 6, 0.6), c(330, 6, 0.1)))
## Not run:
## User defined coordinates may define a degenerated simplex:
simplex <- labsimplex(n = 3,
usrdef = rbind(c(390, 8, 0.3), c(340, 8, 0.3),
c(355, 8, 0.3), c(340, 5, 0.1)))
## End(Not run)