LHD (version 1.1.0)

LaPSO: Particle Swarm Optimization for LHD

Description

LaPSO returns an LHD matrix generated by particle swarm optimization algorithm (PSO)

Usage

LaPSO(
  n,
  k,
  m = 10,
  N = 10,
  SameNumP = 0,
  SameNumG = n/4,
  p0 = 1/(k - 1),
  OC = "phi_p",
  p = 15,
  q = 1
)

Arguments

n

A positive integer.

k

A positive integer.

m

A positive integer.

N

A positive integer.

SameNumP

A non-negative integer.

SameNumG

A non-negative integer.

p0

A probability.

OC

An optimality criterion.

p

A positive integer.

q

The default is set to be 1, and it could be either 1 or 2.

Value

If all inputs are logical, then the output will be a n by k LHD.

Details

  • n stands for the number of rows (or run size).

  • k stands for the number of columns (or the number of factors).

  • m stands for the number of particles. The default is set to be 10.

  • N stands for the number of iterations. The default is set to be 10.

  • SameNumP stands for how many elements in current column of current particle LHD should be the same as corresponding Personal Best. SameNumP=0, 1, 2, ..., n, and 0 means to skip the "exchange". The default is set to be 0.

  • SameNumG stands for how many elements in current column of current particle LHD should be the same as corresponding Global Best. SameNumP=0, 1, 2, ..., n, and 0 means to skip the "exchange". The default is set to be n/4.

  • SameNumP and SameNumG cannot be 0 at the same time.

  • p0 stands the probability of exchange two randomly selected elements in current column of current particle LHD. The default is set to be 1/(k - 1).

  • OC stands for the optimality criterion, the default setting is "phi_p", and it could be one of the following: "phi_p", "AvgAbsCor", "MaxAbsCor", "MaxProCriterion".

  • p is the parameter in the phi_p formula, and p is prefered to be large. The default is set to be 15.

  • If q is 1 (the default setting), dij is the rectangular distance. If q is 2, dij is the Euclidean distance.

References

Chen, R.-B., Hsieh, D.-N., Hung, Y., and Wang, W. (2013) Optimizing Latin hypercube designs by particle swarm. Stat. Comput., 23, 663-676.

Examples

Run this code
# NOT RUN {
#generate a 5 by 3 maximin distance LHD with the default setting
try=LaPSO(n=5,k=3)
try
phi_p(try)   #calculate the phi_p of "try".

#Another example
#generate a 8 by 4 nearly orthogonal LHD
try2=LaPSO(n=8,k=4,OC="AvgAbsCor")
try2
AvgAbsCor(try2)  #calculate the average absolute correlation.
# }

Run the code above in your browser using DataLab