Operators
pymoode.operators.des
- class pymoode.operators.des.DES(variant: str, **kwargs)
Differential Evolution parent selection class
- Parameters:
- variantstr, optional
Differential evolution strategy. Must be a string in the format: “DE/selection/n/crossover”, in which, n in an integer of number of difference vectors, and crossover is either ‘bin’ or ‘exp’. Selection variants are:
‘ranked’
‘rand’
‘best’
‘current-to-best’
‘current-to-rand’
‘rand-to-best’
Methods
__call__(problem, elem, *args[, to_numpy])Call self as a function.
do(problem, pop, n_select, n_parents[, to_pop])Choose from the population new individuals to be selected.
pymoode.operators.dex
- class pymoode.operators.dex.DEX(variant='bin', CR=0.7, at_least_once=True, **kwargs)
Differential evolution crossover (DE mutation is considered a part of this operator)
- Parameters:
- variantstr | callable, optional
Crossover variant. Must be either “bin”, “exp”, or callable. By default “bin”. If callable, it has the form:
cross_function(n_matings, n_var, CR, at_least_once=True)- CRfloat, optional
Crossover parameter. Defined in the range [0, 1] To reinforce mutation, use higher values. To control convergence speed, use lower values.
- at_least_oncebool, optional
Either or not offsprings must inherit at least one attribute from mutant vectors, by default True
Methods
__call__(problem, elem, *args[, to_numpy])Call self as a function.
default_prepare(pop, parents)Utility function that converts population and parents from pymoo Selection to pop and X
do