mosmafs (version 0.1.2)

mutUniformResetSHW: Uniform Reset Scaled by Hamming Weight

Description

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 thatmean(P("1") / P("0")) = m / n * mean(reset.dist / (1 - reset.dist))`.

The mutUniformMetaResetSHW does reset with a weighted mean of distributions.

Usage

mutUniformResetSHW(ind, p = 0.1, reset.dist, ...)

mutUniformMetaResetSHW(ind, p = 0.1, reset.dists, reset.dist.weights, ...)

Value

[integer] the mutated individual

Arguments

ind

[integer] binary individual.

p

[numeric] average reset probability, must be between 0 and 1.

reset.dist

[numeric] approximate probability to draw 1-bit per entry.

...

further arguments passed on to the method.

reset.dists

[matrix] columns of probabilities, with length(ind) cols and length(reset.dist.weights) rows.

reset.dist.weights

[numeric] weight vector to select among reset.dist columns.