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
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intprotected PopulationTypeFields inherited from class unifeat.featureSelection.wrapper.WrapperApproach
classLabel, nameFeatures, PROJECT_PATH, TEMP_PATHFields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int[]This method creates the selected feature subset based on the fittest individual in the population.validate()This method returns the potential errors in the input parameters.Methods inherited from class unifeat.featureSelection.wrapper.WrapperApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSetMethods inherited from class unifeat.featureSelection.FeatureSelection
evaluateFeatures, getSelectedFeatureSubset, setNumSelectedFeature
-
Field Details
-
population
-
NUM_ITERATION
protected final int NUM_ITERATION -
K_FOLDS
protected final int K_FOLDS
-
-
Constructor Details
-
BasicGA
Initializes the parameters- Parameters:
arguments- array of parameters contains (path,numFeatures,classifierType,selectedClassifierPan,selectionType,crossoverType,mutationType,replacementType,numIterationpopulationSize,crossoverRate,mutationRate,kFolds) in whichpathis the path of the project,numFeaturesis the number of original features in the dataset,classifierTypeis the classifier type for evaluating the fitness of a solution,selectedClassifierPanis the selected classifier panel,selectionTypeis used for selecting parents from the individuals of a population according to their fitness,crossoverTypeis used for recombining the parents to generate new offsprings based on crossover rate,mutationTypeis used for mutating new offsprings by changing the value of some genes in them based on mutation rate,replacementTypeis used for handling populations from one generation to the next generation,numIterationis the maximum number of allowed iterations that algorithm repeated,populationSizeis the size of population of candidate solutions,crossoverRateis the probability of crossover operation,mutationRateis the probability of mutation operation, andkFoldsis 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
This method returns the potential errors in the input parameters.- Overrides:
validatein classFeatureSelection- Returns:
- a string contains the information about incorrect parameters
-