phi_optimize {SOAs} | R Documentation |
function to optimize the phi_p value of an array by level permutation
Description
takes an n x m array and returns an n x m array with improved phi_p value (if possible)
Usage
phi_optimize(
D,
noptim.rounds = 1,
noptim.repeats = 1,
dmethod = "manhattan",
p = 50
)
Arguments
D |
numeric matrix or data.frame with numeric columns, n x m. A symmetric array (e.g. an OA) with |
noptim.rounds |
number of rounds in the Weng algorithm |
noptim.repeats |
number of independent repeats of the Weng algorithm |
dmethod |
distance method for |
p |
p for |
Details
The function uses the algorithm proposed by Weng (2014) for SOA optimization:
It starts with a random permutation of column levels.
Initially, individual columns are randomly permuted (m permuted matrices, called one-neighbours), and the best permutation w.r.t. the phi_p
value (manhattan distance) is
is made the current optimum. This continues, until the current optimum is not improved by a set of randomly drawn one-neighbours.
Subsequently, pairs of columns are randomly permuted (choose(m,2)
permuted matrices, called two-neighbours). If the current optimum can be improved or the number of optimization rounds has not yet been exhausted,
a new round with one-neighbours is started with the current optimum. Otherwise, the current optimum is returned, or an independent repeat is initiated (if requested).
Limited experience suggests that an increase of noptim.rounds
from the default 1 is often helpful, whereas an increase of noptim.repeats
did not yield as much improvement.
Value
an n x m matrix
Author(s)
Ulrike Groemping
References
For full detail, see SOAs-package
.
Weng (2014)
Examples
oa <- lhs::createBoseBush(8,16)
print(phi_p(oa, dmethod="manhattan"))
oa_optimized <- phi_optimize(oa)
print(phi_p(oa_optimized, dmethod="manhattan"))