optimsimplex.gradientfv: Simplex Gradient

Description Usage Arguments Value Author(s) See Also

View source: R/optimsimplex.gradientfv.R

Description

optimsimplex.gradientfv determines the simplex gradient of the function which is computed by the secondary functions optimsimplex.gradcenter and optimsimplex.gradforward.

Usage

1
2
3
4
  optimsimplex.gradientfv(this = NULL, fun = NULL, method = "forward",
                          data = NULL)
  optimsimplex.gradcenter(this = NULL, fun = NULL, data = NULL)
  optimsimplex.gradforward(this = NULL)

Arguments

this

An simplex object

fun

The function to compute at vertices. The function is expected to have the following input and output arguments:

myfunction <- function(x, this){
...
return(list(f=f,this=this))
}

where x is a row vector and this a user-defined data, i.e. the data argument.

method

The method used to compute the simplex gradient. Two methods are available: 'forward' and 'centered'. The 'forward' method uses the current simplex to compute the gradient (using optimsimplex.dirmat and optimsimplex.deltafv). The 'centered' method creates an intermediate simplex and computes the average.

data

A user-defined data passed to the function. If data is provided, it is passed to the callback function both as an input and output argument. data may be used if the function uses some additionnal parameters. It is returned as an output parameter because the function may modify the data while computing the function value. This feature may be used, for example, to count the number of times that the function has been called.

Value

optimsimplex.gradientfv returns a list with the following elements:

g

A column vector of function gradient (with length this$n).

data

The updated user-defined data.

optimsimplex.gradcenter returns a list with the following elements:

g

A column vector of function gradient (with length this$n).

data

The updated user-defined data.

optimsimplex.gradforward returns a column vector of function gradient (with length this$n).

Author(s)

Author of Scilab optimsimplex module: Michael Baudin (INRIA - Digiteo)

Author of R adaptation: Sebastien Bihorel (sb.pmlab@gmail.com)

See Also

optimsimplex, optimsimplex.dirmat, optimsimplex.deltafv


optimsimplex documentation built on Jan. 29, 2022, 1:09 a.m.