Click or drag to resize
Accord.NET (logo)

Population Class

Population of chromosomes.
Inheritance Hierarchy
SystemObject
  Accord.GeneticPopulation

Namespace:  Accord.Genetic
Assembly:  Accord.Genetic (in Accord.Genetic.dll) Version: 3.8.0
Syntax
public class Population
Request Example View Source

The Population type exposes the following members.

Constructors
  NameDescription
Public methodPopulation
Initializes a new instance of the Population class.
Top
Properties
  NameDescription
Public propertyAutoShuffling
Determines of auto shuffling is on or off.
Public propertyBestChromosome
Best chromosome of the population.
Public propertyCrossoverRate
Crossover rate, [0.1, 1].
Public propertyFitnessAvg
Average fitness of the population.
Public propertyFitnessFunction
Fitness function to apply to the population.
Public propertyFitnessMax
Maximum fitness of the population.
Public propertyFitnessSum
Summary fitness of the population.
Public propertyItem
Get chromosome with specified index.
Public propertyMutationRate
Mutation rate, [0.1, 1].
Public propertyRandomSelectionPortion
Random selection portion, [0, 0.9].
Public propertySelectionMethod
Selection method to use with the population.
Public propertySize
Size of the population.
Top
Methods
  NameDescription
Public methodAddChromosome
Add chromosome to the population.
Public methodCrossover
Do crossover in the population.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMigrate
Perform migration between two populations.
Public methodMutate
Do mutation in the population.
Public methodRegenerate
Regenerate population.
Public methodResize(Int32)
Resize population to the new specified size.
Public methodResize(Int32, ISelectionMethod)
Resize population to the new specified size.
Public methodRunEpoch
Run one epoch of the population.
Public methodSelection
Do selection.
Public methodShuffle
Shuffle randomly current population.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The class represents population - collection of individuals (chromosomes) and provides functionality for common population's life cycle - population growing with help of genetic operators and selection of chromosomes to new generation with help of selection algorithm. The class may work with any type of chromosomes implementing IChromosome interface, use any type of fitness functions implementing IFitnessFunction interface and use any type of selection algorithms implementing ISelectionMethod interface.

See Also