Combination of the idea of mutBitflipCHW
with mutUniformReset
.
If a given bitvector has m
1s and n
0s, then, with probability p
for
each bit, it is drawn anew from the distribution
((m + 1) * reset.dist) / (m * reset.dist + n * (1 - reset.dist) + 1)
.
The reasoning behind this is that, without Laplace smoothing, drawing from
m * reset.dist
/ (m * reset.dist + n * (1 - reset.dist))would lead to probabilities of drawing a "0" or "1" such that
mean(P("1") / P("0")) = m / n * mean(reset.dist / (1 - reset.dist))`.
The mutUniformMetaResetSHW
does reset with a weighted mean of distributions.
mutUniformResetSHW(ind, p = 0.1, reset.dist, ...)mutUniformMetaResetSHW(ind, p = 0.1, reset.dists, reset.dist.weights, ...)
[integer]
the mutated individual
[integer]
binary individual.
[numeric]
average reset probability, must be between 0 and 1.
[numeric]
approximate probability to draw 1-bit per entry.
further arguments passed on to the method.
[matrix]
columns of probabilities, with length(ind)
cols and
length(reset.dist.weights)
rows.
[numeric]
weight vector to select among reset.dist
columns.