java.lang.Object
unifeat.featureSelection.wrapper.GABasedMethods.BasicIndividual<Boolean>
unifeat.featureSelection.wrapper.GABasedMethods.HGAFS.Individual

public class Individual extends BasicIndividual<Boolean>
This java class is used to represent an individual in simple genetic algorithm (Simple GA) method in which the type of gene vector is boolean.
Author:
Sina Tabakhi
See Also:
  • Constructor Details

    • Individual

      public Individual(int dimension)
      Initializes the parameters
      Parameters:
      dimension - the dimension of problem which equals to total number of features in the dataset
  • Method Details

    • numSelectedFeatures

      public int numSelectedFeatures()
      This method returns the number of selected features by the individual based on its gene vector.
      Specified by:
      numSelectedFeatures in class BasicIndividual<Boolean>
      Returns:
      number of selected features by the individual
    • selectedFeaturesSubset

      public int[] selectedFeaturesSubset()
      This method returns the indices of selected features by the individual based on its gene vector.
      Specified by:
      selectedFeaturesSubset in class BasicIndividual<Boolean>
      Returns:
      the array of indices of the selected features by the individual