cbx.objectives.drop_wave#

class cbx.objectives.drop_wave[source]#

Bases: cbx_objective

Drop Wave

The Drop Wave function is a function with many local minima and one global minimum [1]. It is defined as

\[f(x,y) = -\left( 1 + \cos(12 \sqrt{x^2 + y^2}) \right) \exp \left( -\frac{x^2 + y^2}{2(1 + 0.001(x^2 + y^2))} \right),\]

see [1].

Parameters:

None

Global minima#

  • \(f(x,y) = -1\) at \((x,y) = (0, 0)\)

Examples

>>> import numpy as np
>>> from cbx.objectives import drop_wave
>>> x = np.array([[1,2], [3,4], [5,6]])
>>> f = drop_wave()
>>> f(x)

Visualization#

(Source code, png, hires.png, pdf)

../../_images/cbx-objectives-drop_wave-1.png

References