optimsimplex.shrink: Simplex Shrink

Description Usage Arguments Value Author(s) See Also

View source: R/optimsimplex.shrink.R

Description

This function shrinks the simplex with given coefficient sigma and returns an updated simplex. The shrink is performed with respect to the first point in the simplex.

Usage

1
  optimsimplex.shrink(this = NULL, fun = NULL, sigma = 0.5, data = 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.

sigma

The shrinkage coefficient. The default value is 0.5.

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

Return a list with the following elements:

this

The updated simplex object.

data

The updated user-defined data.

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 documentation built on Jan. 29, 2022, 1:09 a.m.