Class BasicPopulation<IndividualType>

java.lang.Object
unifeat.featureSelection.wrapper.GABasedMethods.BasicPopulation<IndividualType>
Type Parameters:
IndividualType - the type of individual implemented in GA algorithm
Direct Known Subclasses:
Population, Population

public abstract class BasicPopulation<IndividualType> extends Object
The abstract class contains the main methods and fields that are used in all GA-based feature selection methods. This class is used to implement a population of individuals in GA algorithm.
Author:
Sina Tabakhi
  • Field Details

    • population

      protected IndividualType[] population
    • fitnessEvaluator

      public static FitnessEvaluator fitnessEvaluator
    • PROBLEM_DIMENSION

      public static int PROBLEM_DIMENSION
    • POPULATION_SIZE

      protected static int POPULATION_SIZE
    • CROSS_OVER_RATE

      protected static double CROSS_OVER_RATE
    • MUTATION_RATE

      protected static double MUTATION_RATE
    • SELECTION_TYPE

      protected static SelectionType SELECTION_TYPE
    • CROSSOVER_TYPE

      protected static CrossOverType CROSSOVER_TYPE
    • MUTATION_TYPE

      protected static MutationType MUTATION_TYPE
    • REPLACEMENT_TYPE

      protected static ReplacementType REPLACEMENT_TYPE
  • Constructor Details

    • BasicPopulation

      public BasicPopulation(Class<IndividualType> individual)
      Initializes the parameters
      Parameters:
      individual - the type of individual implemented in GA algorithm
  • Method Details

    • initialization

      public abstract void initialization()
      This method initializes each individual in the population.
    • evaluateFitness

      public abstract void evaluateFitness()
      This method evaluates the fitness of each individual in the population by predefined fitness function.
    • operateSelection

      public abstract void operateSelection()
      This method selects parents from the individuals of a population according to their fitness that will recombine for next generation.
    • operateCrossOver

      public abstract void operateCrossOver()
      This method recombines (cross over) the parents to generate new offsprings.
    • operateMutation

      public abstract void operateMutation()
      This method mutates new offsprings by changing the value of some genes in them.
    • operateGenerationReplacement

      public abstract void operateGenerationReplacement()
      This method handles populations from one generation to the next generation.
    • getFittestIndividual

      public abstract IndividualType getFittestIndividual()
      This method returns the fittest individual in the population
      Returns:
      the fittest individual in the population
    • getFitness

      public abstract double[] getFitness()
      This method returns an array of fitness values of individuals in a population
      Returns:
      an array of fitness values of individuals