makeNaryFunctionFitnessFunction: Create a fitness function from a n-ary reference function

Description Usage Arguments Value See Also

View source: R/fitness.r

Description

Creates a fitness function that calculates an error measure with respect to an arbitrary n-ary reference function based sample points generated by a given designFunction. When an indsizelimit is given, individuals exceeding this limit will receive a fitness of Inf.

Usage

1
2
makeNaryFunctionFitnessFunction(func, dim, designFunction = gridDesign,
  errorMeasure = rmse, indsizelimit = NA, ...)

Arguments

func

The reference function. Its single argument must be numeric vector of length dim and it must return a scalar numeric.

dim

The dimension of the reference function.

designFunction

A function to generate sample points. Its first argument must be dim. Defaults to gridDesign.

errorMeasure

A function to use as an error measure, defaults to RMSE.

indsizelimit

Individuals exceeding this size limit will get a fitness of Inf.

...

Additional arguments to the designFunction.

Value

A fitness function based on the reference function func.

See Also

latinHypercubeDesign, gridDesign,


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