View Source Genetix.Evolution.Select (Genetix v0.1.0)
Contain functions with different aproaches / strategies to make the selection. Selection is the stage of a genetic algorithm or more general evolutionary algorithm in which individual genomes are chosen from a population for later breeding (e.g., using the crossover operator).
Link to this section Summary
Functions
Also known as fitness proportionale selection, chooses parents with a probability proportional to their fitness.
Often to get better parameters, strategies with partial reproduction are used.
One of them is elitism, in which a small portion of the best individuals from the last generation is carried over (without any changes) to the next one.
With Elitism selection, we chose the better number_of_candidates
candidates (using its fitness_function).
Random selection pays no mind to chromosome's fitness and select a random number_of_candidates
candidates from the population.
Take care because this strategy is uncommon but is very useful if you goal is to obtain a high genetic diversity.
Tournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.
Tournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.
Link to this section Functions
Also known as fitness proportionale selection, chooses parents with a probability proportional to their fitness.
Often to get better parameters, strategies with partial reproduction are used.
One of them is elitism, in which a small portion of the best individuals from the last generation is carried over (without any changes) to the next one.
With Elitism selection, we chose the better number_of_candidates
candidates (using its fitness_function).
Take care because with this kind of selection we can have a lack of diversity
Random selection pays no mind to chromosome's fitness and select a random number_of_candidates
candidates from the population.
Take care because this strategy is uncommon but is very useful if you goal is to obtain a high genetic diversity.
select_tournament_max(population, number_of_candidates, opts \\ [])
View SourceTournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.
In tournament selection, tournaments can be any n-way: the tournament size can be any nombre from 1 to the size of the population.
The tournament size is defined by tournament_size
hyperparameter.
This implementation allows duplicates.
Tournamente selection works like this:
- Choose a pool of n chromosomes where n is the
tournament_size
. - Choose the fittest cohormosome from the tournament.
- Repeat.
The beauty of tournament selection is the balance between genetic diversity and fitness. In this case we are using the max_by function
select_tournament_min(population, number_of_candidates, opts \\ [])
View SourceTournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.
In tournament selection, tournaments can be any n-way: the tournament size can be any nombre from 1 to the size of the population.
The tournament size is defined by tournament_size
hyperparameter.
This implementation allows duplicates.
Tournamente selection works like this:
- Choose a pool of n chromosomes where n is the
tournament_size
. - Choose the fittest cohormosome from the tournament.
- Repeat.
The beauty of tournament selection is the balance between genetic diversity and fitness. In this case we are using the min_by function