scikit-optimize 0.7.4 Other versions
skopt.benchmarks
skopt.benchmarks.
bench2
A benchmark function for test purposes.
f(x) = x ** 2 if x < 0(x-5) ** 2 - 5 otherwise.
(x-5) ** 2 - 5 otherwise.
It has a global minima with f(x*) = -5 at x* = 5.