Class BasicGA<PopulationType>

java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.wrapper.WrapperApproach
unifeat.featureSelection.wrapper.GABasedMethods.BasicGA<PopulationType>
Type Parameters:
PopulationType - the type of population implemented in GA algorithm
Direct Known Subclasses:
HGAFS, SimpleGA

public abstract class BasicGA<PopulationType> extends WrapperApproach
The abstract class contains the main methods and fields that are used in all GA-based feature selection methods.
Author:
Sina Tabakhi
See Also:
  • Field Details

    • population

      protected PopulationType population
    • NUM_ITERATION

      protected final int NUM_ITERATION
    • K_FOLDS

      protected final int K_FOLDS
  • Constructor Details

    • BasicGA

      public BasicGA(Object... arguments)
      Initializes the parameters
      Parameters:
      arguments - array of parameters contains ( path, numFeatures, classifierType, selectedClassifierPan, selectionType, crossoverType, mutationType, replacementType, numIteration populationSize, crossoverRate, mutationRate, kFolds) in which path is the path of the project, numFeatures is the number of original features in the dataset, classifierType is the classifier type for evaluating the fitness of a solution, selectedClassifierPan is the selected classifier panel, selectionType is used for selecting parents from the individuals of a population according to their fitness, crossoverType is used for recombining the parents to generate new offsprings based on crossover rate, mutationType is used for mutating new offsprings by changing the value of some genes in them based on mutation rate, replacementType is used for handling populations from one generation to the next generation, numIteration is the maximum number of allowed iterations that algorithm repeated, populationSize is the size of population of candidate solutions, crossoverRate is the probability of crossover operation, mutationRate is the probability of mutation operation, and kFolds is the number of equal sized subsamples that is used in k-fold cross validation
  • Method Details

    • createSelectedFeatureSubset

      protected abstract int[] createSelectedFeatureSubset()
      This method creates the selected feature subset based on the fittest individual in the population.
      Returns:
      the array of indices of the selected feature subset
    • validate

      public String validate()
      This method returns the potential errors in the input parameters.
      Overrides:
      validate in class FeatureSelection
      Returns:
      a string contains the information about incorrect parameters