makeRegressionFitnessFunction: Create a fitness function for symbolic regression

Description Usage Arguments Value

View source: R/symbolic_regression.r

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

1
2
3
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 ≤q 1

must hold, defaults to 1.0.

Value

A fitness function to be used in symbolic regression.


rgp documentation built on May 30, 2017, 12:45 a.m.