alogos._optimization.ea.operators.selection

Functions

uniform(individuals, sample_size, objective, parameters, state)

Perform uniform selection via uniform sampling with replacement.

truncation(individuals, sample_size, objective, parameters, state)

Perform truncation selection via deterministic cut-off.

tournament(individuals, sample_size, objective, parameters, state)

Perform tournament selection via sampling with replacement.

rank_proportional(individuals, sample_size, objective, parameters, state)

Perform rank-proportional selection with linear scaling.

fitness_proportional(individuals, sample_size, objective, parameters, state)

Perform fitness-proportional selection with linear scaling.


Detailed object descriptions

alogos._optimization.ea.operators.selection.uniform(individuals, sample_size, objective, parameters, state)[source]

Perform uniform selection via uniform sampling with replacement.

References

  • Eiben, Introduction to Evolutionary Computing (2e 2015): p. 86

alogos._optimization.ea.operators.selection.truncation(individuals, sample_size, objective, parameters, state)[source]

Perform truncation selection via deterministic cut-off.

Given a population, return the best <proportion> of them.

alogos._optimization.ea.operators.selection.tournament(individuals, sample_size, objective, parameters, state)[source]

Perform tournament selection via sampling with replacement.

Given a population, draw <tournament_size> competitors randomly and select the single best of them.

alogos._optimization.ea.operators.selection.rank_proportional(individuals, sample_size, objective, parameters, state)[source]

Perform rank-proportional selection with linear scaling.

alogos._optimization.ea.operators.selection.fitness_proportional(individuals, sample_size, objective, parameters, state)[source]

Perform fitness-proportional selection with linear scaling.

Considerations for special float values:

  • NaN values are ignored, i.e. the individual has 0.0% chance of being selected.

  • +Inf values are 1) ignored in minimization or 2) replaced by a large positive number in maximization.

  • -Inf values are 1) ignored in maximization or 2) replaced by a large negative number in minimization.