desdeo_emo.selection

This module provides implementations of various selection operators.

Submodules

Package Contents

Classes

APD_Select

The selection operator for the RVEA algorithm. Read the following paper for more

NSGAIII_select

The NSGA-III selection operator. Code is heavily based on the version of nsga3 in

TournamentSelection

Tournament selection operator.

MOEAD_select

The MOEAD selection operator.

class desdeo_emo.selection.APD_Select(pop: desdeo_emo.population.Population.Population, time_penalty_function: Callable, alpha: float = 2, selection_type: str = None)[source]

Bases: desdeo_emo.selection.SelectionBase.InteractiveDecompositionSelectionBase

The selection operator for the RVEA algorithm. Read the following paper for more details. R. Cheng, Y. Jin, M. Olhofer and B. Sendhoff, A Reference Vector Guided Evolutionary Algorithm for Many-objective Optimization, IEEE Transactions on Evolutionary Computation, 2016

Parameters:
  • pop (Population) – The population instance

  • time_penalty_function (Callable) – A function that returns the time component in the penalty function.

  • alpha (float, optional) – The RVEA alpha parameter, by default 2

do(pop: desdeo_emo.population.Population.Population) List[int]

Select individuals for mating on basis of Angle penalized distance.

Parameters:

pop (Population) – The current population.

Returns:

List of indices of the selected individuals

Return type:

List[int]

_partial_penalty_factor() float
Calculate and return the partial penalty factor for APD calculation.

This calculation does not include the angle related terms, hence the name. If the calculated penalty is outside [0, 1], it will round it up/down to 0/1

Returns:

The partial penalty value

Return type:

float

class desdeo_emo.selection.NSGAIII_select(pop: desdeo_emo.population.Population.Population, n_survive: int = None, selection_type: str = None)[source]

Bases: desdeo_emo.selection.SelectionBase.InteractiveDecompositionSelectionBase

The NSGA-III selection operator. Code is heavily based on the version of nsga3 in

the pymoo package by msu-coinlab.

Parameters:
  • pop (Population) – [description]

  • n_survive (int, optional) – [description], by default None

do(pop: desdeo_emo.population.Population.Population) List[int]

Select individuals for mating for NSGA-III.

Parameters:

pop (Population) – The current population.

Returns:

List of indices of the selected individuals

Return type:

List[int]

get_extreme_points_c(F, ideal_point, extreme_points=None)

Taken from pymoo

get_nadir_point(extreme_points, ideal_point, worst_point, worst_of_front, worst_of_population)
niching(F, n_remaining, niche_count, niche_of_individuals, dist_to_niche)
associate_to_niches(F, ref_dirs, ideal_point, nadir_point, utopian_epsilon=0.0)
calc_niche_count(n_niches, niche_of_individuals)
calc_perpendicular_distance(N, ref_dirs)
_calculate_fitness(pop) numpy.ndarray
class desdeo_emo.selection.TournamentSelection(pop, tournament_size)[source]

Bases: desdeo_emo.selection.SelectionBase.SelectionBase

Tournament selection operator.

Parameters:
  • pop (Population) – The population of individuals

  • tournament_size (int) – Size of the tournament.

do(pop, fitness) List[int]

Performs tournament selections and returns the parents. :param pop: The current population. :type pop: Population

Returns:

List of indices of the selected individuals

Return type:

List[int]

_tour_select()

Tournament selection. Choose number of individuals to participate and select the one with the best fitness.

Parameters:
  • fitness (array_like) – An array of each individual’s fitness.

  • tournament_size (int) – Number of participants in the tournament.

Returns:

The index of the best individual.

Return type:

int

class desdeo_emo.selection.MOEAD_select(pop: desdeo_emo.population.Population.Population, SF_type: desdeo_tools.scalarization.MOEADSF.MOEADSFBase, n_neighbors: int, selection_type: str = None)[source]

Bases: desdeo_emo.selection.SelectionBase.InteractiveDecompositionSelectionBase

The MOEAD selection operator.

Parameters:
  • pop (Population) – The population of individuals

  • SF_type (MOEADSFBase) – The scalarizing function employed to evaluate the solutions

do(pop: desdeo_emo.population.Population.Population, current_neighborhood: int) List[int]

Select the individuals that are kept in the neighborhood.

Parameters:
  • pop (Population) – The current population.

  • vectors (ReferenceVectors) – Class instance containing reference vectors.

  • ideal_point – Ideal vector found so far

  • current_neighborhood – Neighborhood to be updated

  • offspring_fx – Offspring solution to be compared with the rest of the neighborhood

Returns:

List of indices of the selected individuals

Return type:

List[int]

_evaluate_SF(neighborhood, weights, ideal_point)
choose_parents(current_neighborhood: int, n_parents: int) List[int]
adapt_RVs(fitness: numpy.ndarray) None