Selection#
Parent and survivor selection.
tournament()– the best ofkrandom individuals;double_tournament()– a fitness tournament followed by a size tournament, the nonparametric parsimony pressure of Luke and Panait (2002);epsilon_lexicase()– ε-lexicase selection with the median absolute deviation of each case as threshold (La Cava, Spector and Danai, 2016);nondominated_sort(),crowding_distance(),nsga2_survivors()– the elitist multi-objective selection of NSGA-II (Deb et al., 2002), used with error and complexity (and age, for age–fitness Pareto optimization, Schmidt and Lipson, 2011).
Examples#
>>> import numpy as np
>>> from eqdisco.selection import nondominated_sort
>>> F = np.array([[1, 5], [2, 3], [3, 1], [3, 4], [4, 4]])
>>> [f.tolist() for f in nondominated_sort(F)]
[[0, 1, 2], [3], [4]]
Tournament, double tournament, epsilon-lexicase, Pareto sorting and NSGA-II survival.
Functions#
|
Indices of |
|
Double tournament: the smaller of two fitness-tournament winners wins with probability |
|
ε-lexicase selection. |
Fast non-dominated sorting: list of fronts (index arrays), best front first. |
|
Crowding distance of the members of one front (boundary points get infinity). |
|
|
Elitist NSGA-II environmental selection of |
|
Binary (or |
|
Boolean mask of the non-dominated rows of |