Title: | Lioness Algorithm (LA) |
---|---|
Description: | Contains Lioness Algorithm (LA) for finding optimal designs over continuous design space, optimal Latin hypercube designs, and optimal order-of-addition designs. LA is a brand new nature-inspired meta-heuristic optimization algorithm. Detailed methodologies of LA and its implementation on numerical simulations can be found at Hongzhi Wang, Qian Xiao and Abhyuday Mandal (2021) <doi:10.48550/arXiv.2010.09154>. |
Authors: | Hongzhi Wang [aut, cre], Qian Xiao [aut], Abhyuday Mandal [aut] |
Maintainer: | Hongzhi Wang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.3 |
Built: | 2024-11-04 06:48:51 UTC |
Source: | CRAN |
LA_LHDC
returns an optimal n
by k
Latin hypercube design (LHD) matrix generated by lioness algorithm (LA)
LA_LHDC(n, k, m = 100L, N = 5000L, OC = "phi_p", p = 15L, q = 1L) permuC(x) seqC(a, b) rLHDC(n, k) dijC(X, i, j, q = 1L) phi_pC(X, p = 15L, q = 1L) MaxProCriterionC(X) corC(x, y) MaxAbsCorC(X) AvgAbsCorC(X) exchangeC(X, j, type = "col")
LA_LHDC(n, k, m = 100L, N = 5000L, OC = "phi_p", p = 15L, q = 1L) permuC(x) seqC(a, b) rLHDC(n, k) dijC(X, i, j, q = 1L) phi_pC(X, p = 15L, q = 1L) MaxProCriterionC(X) corC(x, y) MaxAbsCorC(X) AvgAbsCorC(X) exchangeC(X, j, type = "col")
n |
A positive integer that stands for the number of rows (or run size). |
k |
A positive integer that stands for the number of columns (or factor size). |
m |
A positive integer that stands for the number of starting design candidates. The default is set to be 100. |
N |
A positive integer that stands for the maximum number of iterations. The default is set to be 5000. A larger value of |
OC |
An optimality criterion. The default setting is "phi_p" (for space-filling LHDs), and it could be one of the following: "phi_p", "AvgAbsCor", "MaxAbsCor", "MaxProCriterion". |
p |
A positive integer that is the parameter in the phi_p formula, and |
q |
The default is set to be 1, and it could be either 1 or 2. If |
x |
A vector. |
a |
is the starting value of the sequence. |
b |
is the ending value of the sequence. |
X |
A matrix object. In general, |
i |
A positive integer, which stands for the ith row of |
j |
A positive integer, which stands for the jth column (or row) of |
y |
A vector. |
type |
An exchange type. If |
If all inputs are logical, then the output will be an optimal n
by k
LHD.
#generate a 6 by 3 maximin distance LHD with the default setting try=LA_LHDC(n=6,k=3) try #Another example #generate a 9 by 4 nearly orthogonal LHD try2=LA_LHDC(n=9,k=4,OC="AvgAbsCor") try2
#generate a 6 by 3 maximin distance LHD with the default setting try=LA_LHDC(n=6,k=3) try #Another example #generate a 9 by 4 nearly orthogonal LHD try2=LA_LHDC(n=9,k=4,OC="AvgAbsCor") try2
LA_OofAC
returns a n
by k
D-optimal order-of-addition design matrix generated by lioness algorithm (LA)
LA_OofAC(n, k, m = 100L, N = 5000L) factorialC(x) modC(a, b) rOofAC(n, k) PWOC(X) TC(X) MOMC(X)
LA_OofAC(n, k, m = 100L, N = 5000L) factorialC(x) modC(a, b) rOofAC(n, k) PWOC(X) TC(X) MOMC(X)
n |
A positive integer, which stands for the number of rows (or run size). Note that the maximum of |
k |
A positive integer, which stands for the number of columns (or factor size). |
m |
A positive integer that stands for the number of starting design candidates. The default is set to be 100. |
N |
A positive integer that stands for the maximum number of iterations. The default is set to be 5000. A larger value of |
x |
is a positive integer. |
a |
is a positive integer. |
b |
is a positive integer. |
X |
A matrix object. In general, |
If all inputs are logical, then the output will be a n
by k
D-optimal order-of-addition design.
#generate a D-optimal full OofA with 4 factors. try=LA_OofAC(n=24,k=4,m=10,N=50) try #Another example #generate a D-optimal 11-run OofA with 4 factors. try2=LA_OofAC(n=11,k=4,m=10,N=50) try2
#generate a D-optimal full OofA with 4 factors. try=LA_OofAC(n=24,k=4,m=10,N=50) try #Another example #generate a D-optimal 11-run OofA with 4 factors. try2=LA_OofAC(n=11,k=4,m=10,N=50) try2
LA_OptC
returns optimal designs with continuous factors
LA_OptC(n, lb, ub, m = 100L, N = 5000L, OC = "D", alpha = 0.1) D(X) A(X) GscoreC(X, x) rSign(s = 2L) G(Y)
LA_OptC(n, lb, ub, m = 100L, N = 5000L, OC = "D", alpha = 0.1) D(X) A(X) GscoreC(X, x) rSign(s = 2L) G(Y)
n |
A positive integer that stands for the number of rows (or run size) for a design. |
lb |
A vector contains the lower bounds of all the continuous factors. For example, if there are 3 factors whose lower bounds are 0, 5, and 15, |
ub |
A vector contains the upper bounds of all the continuous factors. For example, if there are 3 factors whose upper bounds are 10, 15, and 25, |
m |
A positive integer that stands for the number of starting design candidates. The default is set to be 100. |
N |
A positive integer that stands for the maximum number of iterations. The default is set to be 5000. A larger value of |
OC |
An optimality criterion. The default setting is "D-optimality" under first-order simple/multiple linear regression model. It could be one of the following: "D", "A", and "G", which stands for "D-optimality", "A-optimality", and "G-optimality", respectively. Note that both "D-optimality" and "A-optimality" are under first-order simple/multiple linear regression model, while "G-optimality" is under second-order multiple linear regression model. |
alpha |
A tuning parameter in algorithm for controlling how big the change would be when updating elements in the step of avoiding local optimum. The default is set to be 0.1, which is the recommended value. |
X |
A matrix object. In general, |
x |
A vector. |
s |
A positive integer. |
Y |
A matrix object. In general, |
If all inputs are logical, then the output will be either a n
by length(lb)
optimal design. Here, the length(lb)
is assumed to be at least 2.
#Assume in a simple linear regression model, we want to find a 20-run #D-optimal design, where the input variable takes values between 0 and 24. #In theory, we know the optimal design is the following: #matrix(c(rep(1,20),rep(0,10),rep(24,10)),ncol=2,nrow=20,byrow=FALSE) #Use LA with default setting to find the optimal design for above problem. try=LA_OptC(n=20,lb=c(1,0),ub=c(1,24)) round(try,8)
#Assume in a simple linear regression model, we want to find a 20-run #D-optimal design, where the input variable takes values between 0 and 24. #In theory, we know the optimal design is the following: #matrix(c(rep(1,20),rep(0,10),rep(24,10)),ncol=2,nrow=20,byrow=FALSE) #Use LA with default setting to find the optimal design for above problem. try=LA_OptC(n=20,lb=c(1,0),ub=c(1,24)) round(try,8)