rgp (version 0.4-1)

makeRegressionFitnessFunction: Create a fitness function for symbolic regression

Description

Creates a fitness function that calculates an error measure with respect to a given set of data variables. A simplified version of the formula syntax is used to describe the regression task. When an indsizelimit is given, individuals exceeding this limit will receive a fitness of Inf.

Usage

makeRegressionFitnessFunction(formula, data, envir, errorMeasure = rmse,
  indsizelimit = NA, penalizeGenotypeConstantIndividuals = FALSE,
  subSamplingShare = 1)

Arguments

formula
A formula object describing the regression task.
data
An optional data frame containing the variables in the model.
envir
The R environment to evaluate individuals in.
errorMeasure
A function to use as an error measure, defaults to RMSE.
indsizelimit
Individuals exceeding this size limit will get a fitness of Inf.
penalizeGenotypeConstantIndividuals
Individuals that do not contain any input variables will get a fitness of Inf.
subSamplingShare
The share of fitness cases $$s$$ sampled for evaluation with each function evaluation. $$0 < s \leq 1$$ must hold, defaults to 1.0.

Value

  • A fitness function to be used in symbolic regression.