Description Usage Arguments Value
Calculate the fitness value for each individuals in the generation based on the passed in fitness function.
1 | fitness(pop, dat, fitnessFunction, model)
|
pop |
boleans matrix determined by |
y |
response variable vector |
X |
data matrix with rows as observations and columns as predictors in the model. |
fitnessFunction |
fitness function that takes in an lm or glm model and returns a numerical fitness of that model. Users can choose AIC or BIC or even define by themselves. |
model |
the linear model that user wants to use to fit in the data,
can be either |
dat |
data frame containing the predictors in the model. First column should be the response variable. |
... |
additional arguments to pass to regression model |
Returns a matrix containing one row with ncol(pop)
observations of the fitness scores of each chromosomes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.