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: | 2025-01-30 02:36:11 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_Lflex
sFFLHD_Lflex
An object of class R6ClassGenerator
of length 24.
A sFFLHD_Lflex object
D
numeric. The number of dimensions for the design. Must be set.
L
numeric. The number of points in each batch, also the number of levels of each dimension. Must be set.
b
integer. The batch number.
s
sFFLHD. The design it takes the points and then reorders them.
X
matrix. The points given in the design.
X_choices
matrix. 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 11
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 11
sFFLHD object that gives a batch of points at a time.
A sFFLHD object
D
numeric. The number of dimensions for the design. Must be set.
L
numeric. The number of points in each batch, also the number of levels of each dimension. Must be set.
maximin
logical. 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.
a
numeric. A root of L that determines the intermediate stages. Is automatically set to smallest possible value, which is recommended.
b
integer. The batch number.
nb
integer. The number of points selected so far.
lb
numeric. Current levels of the small grid.
Lb
numeric. Current levels of the intermediate grid.
Xb
matrix. Current design matrix, continuous from 0 to 1.
Vb
matrix. Small grid design.
Mb
matrix. Intermediate grid design.
Wb
matrix. Big grid design.
A1
matrix. The first OA slice.
r
integer. Used to keep track of loop index.
p
integer. Used to keep track of loop index.
Ar
matrix. Current Ar.
stage
integer. Current stage.
vii
integer. Used to keep track of location in stage 2.
Fslices
list. A list of slices.
FF1.1
matrix. Temporary matrix used to generate slices.
Mb.store
matrix. Temporary storage of Mb.
v.shuffle
integer. 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.
sFFLHDmm
sFFLHDmm
An object of class R6ClassGenerator
of length 24.
A sFFLHDmm object
D
numeric. The number of dimensions for the design. Must be set.
L
numeric. The number of points in each batch, also the number of levels of each dimension. Must be set.
b
integer. The batch number.
s
sFFLHD. The design it takes the points and then reorders them.
X
matrix. The points given in the design.
Xchoices
list. 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 rowspergroup
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 rowspergroup