de_current_1_crossover#
- moocore.de_current_1_crossover(population, /, *, targets=None, lower=None, upper=None, scaling_factor=0.5, crossover_rate=1.0, seed=None)[source]#
Differential evolution crossover used by MOEA/D-DE (DE/current/1).
For each target \(x_i\), two distinct rows \(x_{r_1}, x_{r_2}\) are drawn from
population. Either of them may be the target itself. The offspring takes each variable \(j\) from the mutant \(x_i + F (x_{r_1} - x_{r_2})\) with probability \(CR\), and from the target otherwise. Finally, the offspring is clipped to the bounds.Unlike
de_rand_1_bin_crossover(), the base vector is the target and no variable is forced to come from the mutant, so with \(CR = 0\) the offspring is a copy of the target.- Parameters:
population (
ArrayLike) – 2D array of numerical values, where each row is a decision vector. In MOEA/D-DE, this is the neighbourhood of the subproblem or, with a small probability, the whole population, andtargetsgives the row of the subproblem’s current solution.targets (
ArrayLike|None) – 1D vector of row indices ofpopulation. Each index produces one offspring.Noneuses every row. (default:None)lower (
ArrayLike|None) – Lower bounds of the decision variables. Either a single value, which will be used for all variables, or one value per column.Nonemeans no lower bound. (default:None)upper (
ArrayLike|None) – Upper bounds of the decision variables. Either a single value, which will be used for all variables, or one value per column.Nonemeans no upper bound. (default:None)scaling_factor (
float) – Scaling factor \(F > 0\) of the difference vector. (default:0.5)crossover_rate (
float) – Crossover rate \(CR\), the probability of taking each variable from the mutant. (default:1.0)seed (
int|Generator|None) – Either an integer to seednumpy.random.default_rng(), a Numpy default random number generator (RNG) or an instance of a Numpy-compatible RNG.Noneuses the equivalent of a random seed, as innumpy.random.default_rng(). (default:None)
- Returns:
ndarray– Array with one row per target, where rowiis the offspring of targettargets[i].
See also
de_rand_1_bin_crossoverThe classical DE/rand/1/bin scheme.
Notes
This is the DE operator of MOEA/D-DE [1], which uses \(CR = 1\) and \(F = 0.5\). With \(CR = 1\), the operator is invariant to rotations of the decision space. MOEA/D-DE then applies polynomial mutation, which is not part of this function.
Li and Zhang do not name the mutation step. Tanabe and Ishibuchi (2019) call it the current/1 strategy, a term introduced by Gong et al. (2017), and find it in the source code of MOEA/D-DE, MOEA/D-DRA and MOEA/D-STM.
Li and Zhang do not require the two donors to differ. This function draws two distinct donors, either of which may be the target, as their C++ code does according to Tanabe and Ishibuchi (2019).
Li and Zhang reset values outside the bounds to a random value within them. Their own implementation clips them instead, which is what this function does, and which Tanabe and Ishibuchi (2019) found to work best with this operator. Tanabe and Ishibuchi also explain why some implementations of MOEA/D-DE use DE/rand/1 instead.
References
R. Tanabe and H. Ishibuchi (2019). Review and analysis of three components of the differential evolution mutation operator in MOEA/D-DE. Soft Computing, 23(23):12843–12857. https://doi.org/10.1007/s00500-019-03842-6
W. Gong, Y. Wang, Z. Cai and S. Yang (2017). A weighted biobjective transformation technique for locating multiple optimal solutions of nonlinear equation systems. IEEE Transactions on Evolutionary Computation, 21(5):697–713. https://doi.org/10.1109/TEVC.2017.2670779
Examples
>>> neighbourhood = np.array([[0.5, 0.5], [0.4, 0.9], [0.8, 0.3]]) >>> moocore.de_current_1_crossover( ... neighbourhood, targets=[0], lower=0, upper=1, seed=42 ... ) array([[0.3, 0.8]])