IntegerGeneticAlgorithm#

class pybrops.opt.algo.IntegerGeneticAlgorithm.IntegerGeneticAlgorithm(ngen=250, pop_size=100, rng=RandomState(MT19937) at 0x7F8D0DF4C840, **kwargs)[source]#

Bases: IntegerOptimizationAlgorithm

Class implementing an NSGA-II genetic algorithm adapted for subset selection optimization. The search space is discrete and nominal in nature.

Constructor for NSGA-II subset optimization algorithm.

Parameters:
  • ngen (int) – Number of generations to evolve population.

  • mu (int) – Number of parental candidates to keep in population.

  • lamb (int) – Number of progeny to generate.

  • M (float) – Length of the chromosome genetic map, in Morgans.

  • rng (numpy.random.Generator, numpy.random.RandomState, None) – Random number generator source.

  • kwargs (dict) – Additional keyword arguments.

Methods

minimize

Optimize an objective function.

Attributes

ngen

Number of generations.

pop_size

Number of individuals in the main chromosome population.

rng

Random number generator source.

minimize(prob, miscout=None, **kwargs)[source]#

Optimize an objective function.

Parameters:
  • prob (IntegerProblem) – A problem definition object on which to optimize.

  • miscout (dict) – Miscellaneous output from the constrained optimizaiont algorithm.

  • kwargs (dict) – Additional keyword arguments

Returns:

out – An object containing the solution to the provided problem.

Return type:

IntegerSolution

property ngen: Integral#

Number of generations.

property pop_size: Integral#

Number of individuals in the main chromosome population.

property rng: Generator | RandomState#

Random number generator source.