cbx.objectives.Easom#

class cbx.objectives.Easom[source]#

Bases: cbx_objective

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

\[f(x,y) = -\cos(x) \cos(y) \exp \left( -\left( x - \pi \right)^2 - \left( y - \pi \right)^2 \right).\]
Parameters:

None

Global minima#

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

Examples

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

Visualization#

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

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

References