AssessFitness: Quantify the 'fitness' of a given linear model

Description Usage Arguments Details Examples

Description

AssessFitness() determines 'fitness' of an invidivudal based on the quality of least squares fit of . The default for determining fitness is the Aikake Criteria Index but the user can supply their own custom-made fitness function that takes a linear model output object as its input.

Usage

1
2
AssessFitness(individual, response, predictors, user.family = "gaussian",
  userfunc = "AIC")

Arguments

individual

A binary vector of length C = # of potential co-variates in an individual. Co-variates to be used in the regression of response versus predictors are indicated by ones while the co-variates that are exlcuded are indicated by zeros.

response

The vector of response data (Y)

predictors

A data table or data frame of the co-variates (X)

user.family

Model family name to be passed to glm. Default is "gaussian"

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".

Details

AssessFitness() returns a single fitness value.

Called from within Select()

Examples

1
2
3
\code{\link[GA]{FitnessFunction}}
\code{\link{glm}}
\code{\link{extractAIC}}

stat243proj/GA documentation built on May 15, 2019, 5:03 a.m.