Documentation of 'org.encog.ml.ea.opp.selection.TruncationSelection' Java class
TruncationSelection
org.encog.ml.ea.opp.selection

Class TruncationSelection

  • All Implemented Interfaces:
    java.io.Serializable, SelectionOperator


    public class TruncationSelection
    extends java.lang.Object
    implements SelectionOperator, java.io.Serializable
    Truncation selection chooses a random genome from the top genomes in the population. A percent determines how large this group of top genomes is. http://en.wikipedia.org/wiki/Truncation_selection
    See Also:
    Serialized Form
    • Constructor Detail

      • TruncationSelection

        public TruncationSelection(EvolutionaryAlgorithm theTrainer,
                                   double thePercent)
        Construct the truncation selector.
        Parameters:
        theTrainer - The trainer.
        thePercent - The top percent to select from.
    • Method Detail

      • performSelection

        public int performSelection(java.util.Random rnd,
                                    Species species)
        Selects an fit genome.
        Specified by:
        performSelection in interface SelectionOperator
        Parameters:
        rnd - A random number generator.
        species - The species to select the genome from.
        Returns:
        The selected genome.
      • performAntiSelection

        public int performAntiSelection(java.util.Random rnd,
                                        Species species)
        Selects an unfit genome.
        Specified by:
        performAntiSelection in interface SelectionOperator
        Parameters:
        rnd - A random number generator.
        species - The species to select the genome from.
        Returns:
        The selected genome.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.