phi_optimize | R Documentation |
takes an n x m array and returns an n x m array with improved phi_p value (if possible)
phi_optimize(
D,
noptim.rounds = 1,
noptim.repeats = 1,
dmethod = "manhattan",
p = 50
)
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 |
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.
an n x m matrix
Ulrike Groemping
For full detail, see SOAs-package
.
Weng (2014)
oa <- lhs::createBoseBush(8,16)
print(phi_p(oa, dmethod="manhattan"))
oa_optimized <- phi_optimize(oa)
print(phi_p(oa_optimized, dmethod="manhattan"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.