The ga method yang1998featureFSinR starts with an initial population of solutions and at each step applies a series of operators to the individuals in order to obtain new and better population of individuals. These operators are selection, crossing and mutation methods. This method uses the GA package implementation GAPkg1FSinR GAPkg2FSinR.
A data frame with the features and the class of the examples
class
The name of the dependent variable
featureSetEval
The measure for evaluate features
popSize
The popuplation size
pcrossover
The probability of crossover between individuals
pmutation
The probability of mutation between individuals
maxiter
The number of iterations
run
Number of consecutive iterations without fitness improvement to stop the algorithm
verbose
Print the partial results in each iteration. This functionality is not available if the objective of the evaluation method is to minimize the target value (e.g. regression methods)
Value
A list is returned containing for each repetition of the algorithm:
bestFeatures
A vector with all features. Selected features are marked with 1, unselected features are marked with 0
bestFitness
Evaluation measure obtained with the feature selection
population
Matrix with the population of the last iteration of the algorithm along with the evaluation measure of each individual