| Title: | Sequential Full Factorial-Based Latin Hypercube Design |
|---|---|
| Description: | Gives design points from a sequential full factorial-based Latin hypercube design, as described in Duan, Ankenman, Sanchez, and Sanchez (2015, Technometrics, <doi:10.1080/00401706.2015.1108233>). |
| Authors: | Collin Erickson |
| Maintainer: | Collin Erickson <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.2.9000 |
| Built: | 2026-05-18 06:13:16 UTC |
| Source: | https://github.com/collinerickson/sfflhd |
Generate random Latin hypercube samples with a given budget and return the best one according to the MaxPro criterion.
decentLHS(n, d, ndes, max.time)decentLHS(n, d, ndes, max.time)
n |
Number of points |
d |
Number of dimensions |
ndes |
Max number of random designs to generate |
max.time |
Max amount of time |
Matrix with rows of points
decentLHS(20,2, ndes=10)decentLHS(20,2, ndes=10)
R6 object that gives uses a sFFLHD with L near the requested one, but gives them back in the requested L
sFFLHD_LflexsFFLHD_Lflex
An object of class R6ClassGenerator of length 24.
A sFFLHD_Lflex object
Dnumeric. The number of dimensions for the design. Must be set.
Lnumeric. The number of points in each batch, also the number of levels of each dimension. Must be set.
binteger. The batch number.
ssFFLHD. The design it takes the points and then reorders them.
Xmatrix. The points given in the design.
X_choicesmatrix. Points taken from s and have been reordered, but which have not been returned to the user yet.
s <- sFFLHD_Lflex$new(D=8,L=4) s$get.batch() # sFFLHD(D=7,L=10)$get.batch() doesn't work, needs L=7,8,9,11 s <- sFFLHD_Lflex$new(D=7,L=10) # Uses L=9 s$get.batch() s <- sFFLHD_Lflex$new(D=7,L=10, prefer_L="up") # Should use 11s <- sFFLHD_Lflex$new(D=8,L=4) s$get.batch() # sFFLHD(D=7,L=10)$get.batch() doesn't work, needs L=7,8,9,11 s <- sFFLHD_Lflex$new(D=7,L=10) # Uses L=9 s$get.batch() s <- sFFLHD_Lflex$new(D=7,L=10, prefer_L="up") # Should use 11
sFFLHD object that gives a batch of points at a time.
A sFFLHD object
Dnumeric. The number of dimensions for the design. Must be set.
Lnumeric. The number of points in each batch, also the number of levels of each dimension. Must be set.
maximinlogical. Should maximin distance be used to space out points? TRUE by default. Only used while lb <= 100, not worth it once the boxes are very small.
anumeric. A root of L that determines the intermediate stages. Is automatically set to smallest possible value, which is recommended.
binteger. The batch number.
nbinteger. The number of points selected so far.
lbnumeric. Current levels of the small grid.
Lbnumeric. Current levels of the intermediate grid.
Xbmatrix. Current design matrix, continuous from 0 to 1.
Vbmatrix. Small grid design.
Mbmatrix. Intermediate grid design.
Wbmatrix. Big grid design.
A1matrix. The first OA slice.
rinteger. Used to keep track of loop index.
pinteger. Used to keep track of loop index.
Armatrix. Current Ar.
stageinteger. Current stage.
viiinteger. Used to keep track of location in stage 2.
Fsliceslist. A list of slices.
FF1.1matrix. Temporary matrix used to generate slices.
Mb.storematrix. Temporary storage of Mb.
v.shuffleinteger. A storage value for storing order. Requires extra optimization.
s <- sFFLHD$new(D=2,L=3) s$get.batch() s <- sFFLHD$new(D=2,L=4) s$get.batch()s <- sFFLHD$new(D=2,L=3) s$get.batch() s <- sFFLHD$new(D=2,L=4) s$get.batch()
sFFLHD R6 object that gives a batch of points at a time using maximin. To do this it takes all batches for stage at beginning of stage and then reorders them. Not that great in practice. Requires extra optimization and storage.
sFFLHDmmsFFLHDmm
An object of class R6ClassGenerator of length 24.
A sFFLHDmm object
Dnumeric. The number of dimensions for the design. Must be set.
Lnumeric. The number of points in each batch, also the number of levels of each dimension. Must be set.
binteger. The batch number.
ssFFLHD. The design it takes the points and then reorders them.
Xmatrix. The points given in the design.
Xchoiceslist. Batches taken from s and have been reordered, but which have not been returned to the user yet.
s <- sFFLHDmm$new(D=2,L=3) s$get.batch() s <- sFFLHDmm$new(D=2,L=4) s$get.batch()s <- sFFLHDmm$new(D=2,L=3) s$get.batch() s <- sFFLHDmm$new(D=2,L=4) s$get.batch()
Split a matrix by rows, based on either the number of rows per group or number of splits.
split_matrix(mat, rowspergroup = NULL, nsplits = NULL, shuffle = TRUE)split_matrix(mat, rowspergroup = NULL, nsplits = NULL, shuffle = TRUE)
mat |
A matrix to be split. |
rowspergroup |
Number of rows in a group. |
nsplits |
Number of splits to make. |
shuffle |
Should the splits be shuffled before returning? |
A list of the splits of the matrix.
mat <- matrix(1:12, ncol=2) split_matrix(mat, 4, shuffle=FALSE) split_matrix(mat, 4, shuffle=TRUE) split_matrix(mat, nsplits=3, shuffle=FALSE) # same as 4 rowspergroupmat <- matrix(1:12, ncol=2) split_matrix(mat, 4, shuffle=FALSE) split_matrix(mat, 4, shuffle=TRUE) split_matrix(mat, nsplits=3, shuffle=FALSE) # same as 4 rowspergroup