cbx.objectives.three_hump_camel#
- class cbx.objectives.three_hump_camel[source]#
Bases:
cbx_objective
Three-hump camel function
Three-hump camel function is a multimodal function with a global minimum at \((0,0)\). The function is defined as
\[f(x,y) = 2x^2 - 1.05x^4 + \frac{1}{6}x^6 + xy + y^2\]Examples
>>> import numpy as np >>> from cbx.objectives import three_hump_camel >>> x = np.array([[1,2], [3,4], [5,6.]]) >>> obj = three_hump_camel() >>> obj(x) array([ 7.11666667, 82.45 , 2063.91666667])
Visualization#
(
Source code
,png
,hires.png
,pdf
)