Description Usage Arguments Value Examples
Select()
is used to apply the genetic algorithm to some input dataset
outputs a list containing a list of the indiivdials in the final generation'
of the genetic algorithm, a matrix of the fitness values of all individuals in all
generations and the fitted model from glm for the best individual
1 2 3 |
dataset |
A matrix, datatable, or dataframe |
response.name |
The name of the column in dataset that will act as the response variable to be predicted |
userfunc |
A fitness function that operates on a model that could be provided by the user. The default is the Aikake Information Criteria or "AIC". |
user.family |
Model family name to be passed to |
flag.log.scale |
Default is TRUE if the log of the predictor varaible is to be fit. |
frac.replace |
Fraction of worst parents to be replaced with the best children in each generation |
Niter |
Maximum number of iterations during each run. Default is 100 |
Nruns |
Number of times genetic algorithm is run. Default is 1 |
mutate.rate |
Genetic algorithm mutation rate. If set to FALSE it is automatically determined. A value of 0.01 is suggested |
plot.flag |
Set to TRUE to plot the evolution of the population of individuals over the progression of the algorithm |
Select()
produces a single list each of whose elements are a list or vector of objects
partaining to each of the Nruns
times that the genetic algorithm was run. Each
list element is named according the type of data it contains:
LastGen
is a list of the last generation of solutions produced during each run
Fitness
is a list of the complete fitness matrix representing all generations
during each run
BestModel
is a list of the best model produced during each run
BestFitness
is a vector of the fitness of the best model from each run
1 2 | baseball = read.table(file.choose(),header=TRUE)
out <- Select(dataset=baseball, response.name="salary", Niter=50, Nruns=1, mutate.rate = 0.01)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.