Class SelectionOperator

java.lang.Object
unifeat.featureSelection.wrapper.GABasedMethods.SelectionOperator

public class SelectionOperator extends Object
This java class is used to implement various selection operators for selecting parents from the individuals of a population according to their fitness that will recombine for next generation.

The methods in this class is contained brief description of the applications.

Author:
Sina Tabakhi
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int[]
    fitnessProportionalSelection(double[] fitnessValues, int matingPoolSize)
    Selects parents from the individuals of a population according to their fitness values using fitness proportional selection method in which roulette wheel algorithm is used for selecting each individual based on their probabilities
    static int[]
    rankBasedSelection(double[] fitnessValues, int matingPoolSize)
    Selects parents from the individuals of a population according to their fitness values using rank-based selection method in which roulette wheel algorithm is used for selecting each individual based on their ranks
    static int
    rouletteWheel(double[] probabilities)
    Selects an individual in a population according to their probabilities using roulette wheel algorithm

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SelectionOperator

      public SelectionOperator()
  • Method Details

    • rouletteWheel

      public static int rouletteWheel(double[] probabilities)
      Selects an individual in a population according to their probabilities using roulette wheel algorithm
      Parameters:
      probabilities - the array of probabilities of selecting individuals
      Returns:
      the index of selected individual
    • fitnessProportionalSelection

      public static int[] fitnessProportionalSelection(double[] fitnessValues, int matingPoolSize)
      Selects parents from the individuals of a population according to their fitness values using fitness proportional selection method in which roulette wheel algorithm is used for selecting each individual based on their probabilities
      Parameters:
      fitnessValues - the array of fitness values of individuals in a population
      matingPoolSize - the size of the mating pool
      Returns:
      an array of indices of the selected individuals
    • rankBasedSelection

      public static int[] rankBasedSelection(double[] fitnessValues, int matingPoolSize)
      Selects parents from the individuals of a population according to their fitness values using rank-based selection method in which roulette wheel algorithm is used for selecting each individual based on their ranks
      Parameters:
      fitnessValues - the array of fitness values of individuals in a population
      matingPoolSize - the size of the mating pool
      Returns:
      an array of indices of the selected individuals