desdeo_emo.recombination¶
This module provides implementations of various crossover and mutation operators.
Submodules¶
Package Contents¶
Classes¶
Simulated binary crossover. |
-
class
desdeo_emo.recombination.BioGP_mutation(probability_mutation: float)[source]¶ -
do(self, offspring)¶
-
-
class
desdeo_emo.recombination.BioGP_xover(probability_crossover: float = 0.9, probability_standard: float = 0.5)[source]¶ -
do(self, pop, mating_pop_ids)¶
-
-
class
desdeo_emo.recombination.BP_mutation(lower_limits: numpy.ndarray, upper_limits: numpy.ndarray, ProM: float = None, DisM: float = 20)[source]¶ -
do(self, offspring: numpy.ndarray)¶ Conduct bounded polynomial mutation. Return the mutated individuals.
- Parameters
offspring (np.ndarray) – The array of offsprings to be mutated.
- Returns
The mutated offsprings
- Return type
np.ndarray
-
-
class
desdeo_emo.recombination.EvoDN2Recombination(evolver: BaseEA, ProC: float = 0.8, ProM: float = 0.3, mutation_strength: float = 1.0)[source]¶ -
do(self, pop, mating_pop_ids: list = None)¶
-
-
class
desdeo_emo.recombination.EvoNNRecombination(evolver: BaseEA, ProC: float = 0.8, ProM: float = 0.3, mutation_strength: float = 1.0, mutation_type: str = 'gaussian')[source]¶ -
do(self, pop, mating_pop_ids: list = None)¶
-
-
class
desdeo_emo.recombination.SBX_xover(ProC: float = 1, DisC: float = 30)[source]¶ Simulated binary crossover.
- Parameters
- ProCfloat, optional
[description], by default 1
- DisCfloat, optional
[description], by default 30
-
do(self, pop: numpy.ndarray, mating_pop_ids: list = None) → numpy.ndarray¶ - Consecutive members of mating_pop_ids are crossed over
in pairs. Example: if mating_pop_ids = [0, 2, 3, 6, 5] then the individuals are crossover as: [0, 2], [3, 6], [5, 0]. Note: if the number of elements is odd, the last individual is crossed over with the first one.
- Parameters
pop (np.ndarray) – Array of all individuals
mating_pop_ids (list, optional) –
- Indices of population members to mate, by default None, which shuffles and
mates whole population
- Returns
The offspring produced as a result of crossover.
- Return type
np.ndarray