iterateFitnessFunc: Iterate the fitness function

View source: R/SOptim_RandSearchAlgorithm.R

iterateFitnessFuncR Documentation

Iterate the fitness function

Description

A wrapper function used to iterate an input fitness/objective function in sequential or parallel form. Uses as input a matrix of parameters which represent points randomly drawn for a certain range of parameter values.

Usage

iterateFitnessFunc(fitFunc, paramGrid, parallel = FALSE, ...)

Arguments

fitFunc

A fitness/objective function object to iterate (the first input of this function must be a vector of parameters to be tested (named x), following the order of elements in a parameter list).

paramGrid

A matrix object containing random parameters to be tested generated by drawRandom.

parallel

Use parallel loop? (default: FALSE). Uses %dorng% as the foreach backend.

...

Additional parameters passed to the fitness function.

Value

A vector with the fitness/objective function values. In case of error it will return NA as output.


joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.