Objects of the GenAlg class represent one step (population) in the
evolution of a genetic algorithm. This algorithm has been customized to
perform feature selection for the class prediction problem.
# S4 method for GenAlg
as.data.frame(x, row.names=NULL, optional=FALSE, ...)
# S4 method for GenAlg
as.matrix(x, ...)
# S4 method for GenAlg
summary(object, ...)
object of class GenAlg
object of class GenAlg
character vector giving the row names for the data frame,
or NULL
logical scalar. If TRUE, setting row names and
converting column names to syntactic names is optional.
extra arguments for generic routines
Objects should be created by calls to the GenAlg generator;
they will also be created automatically as a result of applying the function
newGeneration to an existing GenAlg object.
data:The initial population of potential solutions, in the form of a data matrix with one individual per row.
fitfun:A function to compute the fitness of an
individual solution. Must take two input arguments: a vector of
indices into the rows of the population matrix, and a context
list within which any other items required by the function can be
resolved. Must return a real number; higher values indicate better
fitness, with the maximum fitness occurring at the optimal solution
to the underlying numerical problem.
mutfun:A function to mutate individual alleles in the
population. Must take two arguments: the starting allele and a
context list as in the fitness function.
p.mutation:numeric scalar between 0 and 1,
representing the probability that an individual allele will be mutated.
p.crossover:numeric scalar between 0 and 1,
representing the probability that crossover will occur during
reproduction.
generation:integer scalar identifying the current generation.
fitness:numeric vector containing the fitness of all individuals in the population.
best.fit:A numeric value; the maximum fitness.
best.individual:A matrix (often with one row) containing the individual(s) achieving the maximum fitness.
context:A list of additional data required to perform
mutation or to compute fitness. This list is passed along as the
second argument when fitfun and mutfun are called.
signature(x = "GenAlg"): Converts the
GenAlg object into a data frame. The first column contains
the fitness ; remaining columns contain three selected features,
given as integer indices into the rows of the original data matrix.
signature(x = "GenAlg"): Converts the GenAlg
object into a matrix, following the conventions of as.data.frame.
signature(object = "GenAlg"): Print a summary
of the GenAlg object.
Kevin R. Coombes krc@silicovore.com, P. Roebuck proebuck@mdanderson.org
David Goldberg.
"Genetic Algorithms in Search, Optimization and Machine Learning."
Addison-Wesley, 1989.
GenAlg,
GenAlg-tools,
maha.