Learn R Programming

ParamHelpers (version 1.0-55)

Param: Create a description object for a parameter.

Description

The S3 class is a list which stores these elements: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Usage

makeNumericParam(id, lower = -Inf, upper = Inf,
    trafo = identity)

makeNumericVectorParam(id, length, lower = -Inf, upper = Inf, trafo = identity)

makeIntegerParam(id, lower = -Inf, upper = Inf, trafo = identity)

makeIntegerVectorParam(id, length, lower = -Inf, upper = Inf, trafo = identity)

makeLogicalParam(id)

makeDiscreteParam(id, values)

makeDiscreteVectorParam(id, length, values)

makeFunctionParam(id)

makeUntypedParam(id)

Arguments

id
[character(1)] Name of parameter.
length
[integer(1)] Length of vector.
lower
[numeric] Lower bound. Default is -Inf.
upper
[numeric] Upper bound. Default is Inf.
values
[vector | list] Possible discrete values. You are allowed to pass a list of complex R values, which are used as discrete choices. If you do the latter, the elements must be uniquely named, so that the names can be used as
trafo
[function(x)] Function to transform parameter. Is should be applied to the parameter value before it is e.g. passed to a corresponding fitness function. Function must accept a parameter value as the first argument and return a tra

Value

Details

Create a description object for a parameter.

Examples

Run this code
makeNumericParam("x",lower=-1, upper=1)
makeNumericVectorParam("x", length=2)
makeDiscreteParam("y", values=c("a","b"))

Run the code above in your browser using DataLab