benchmarkfcns.schaffern4

benchmarkfcns.schaffern4(arg0: Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]', 'flags.c_contiguous']) Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]']

Computes the value of the Schaffer N. 4 function. SCORES = schaffer4(X) computes the value of the Schaffer N. 4 function at point X. schaffer4 accepts a matrix of size M-by-2 and returns a vector SCORES of size M-by-1 in which each row contains the function value for the corresponding row of X. Properties:

  • Global minimum: 0

  • Location of global minimum: (0, pm 1.25313)

  • Number of dimensions: 2

  • Recommended domain: [-100, 100]^2

  • Number of local minima: many

  • Number of global minima: 2

  • Convexity: non-convex

  • Separability: non-separable

  • Modality: multimodal

For more information, please visit: benchmarkfcns.info/doc/schaffern4fcn

Mathematical Definition

Visualization

schaffern4 landscape