class documentation
class AbstractTestFunction(object):
Known subclasses: cma.bbobbenchmarks.BBOBFunction
Abstract class for test functions.
Defines methods to be implemented in test functions which are to be provided to method setfun of class Logger. In particular, (a) the attribute fopt and (b) the method _evalfull.
The _evalfull method returns two values, the possibly noisy value and the noise-free value. The latter is only meant to be for recording purpose.
Method | __call__ |
Returns the objective function value of argument x. |
Method | evaluate |
Returns the objective function value (in case noisy). |
Method | getfopt |
Returns the best function value of this instance of the function. |
Method | setfopt |
Undocumented |
Class Variable | fopt |
Undocumented |
Method | _evalfull |
return noisy and noise-free value, the latter for recording purpose. |
Instance Variable | _fopt |
Undocumented |
Returns the objective function value of argument x.
Example:
>>> from cma import bbobbenchmarks as bn >>> f3 = bn.F3(13) # instantiate function 3 on instance 13 >>> bool(59.8733529 < f3([0, 1, 2]) < 59.87335292) # call f3, same as f3.evaluate([0, 1, 2]) True
overridden in
cma.bbobbenchmarks.F11
, cma.bbobbenchmarks.F12
, cma.bbobbenchmarks.F13
, cma.bbobbenchmarks.F15
, cma.bbobbenchmarks.F16
, cma.bbobbenchmarks.F2
, cma.bbobbenchmarks.F20
, cma.bbobbenchmarks.F23
, cma.bbobbenchmarks.F24
, cma.bbobbenchmarks.F3
, cma.bbobbenchmarks.F4
, cma.bbobbenchmarks.F5
, cma.bbobbenchmarks.F6
, cma.bbobbenchmarks.F9
, cma.bbobbenchmarks._F8F2
, cma.bbobbenchmarks._FDiffPow
, cma.bbobbenchmarks._FEllipsoid
, cma.bbobbenchmarks._FGallagher
, cma.bbobbenchmarks._FRosenbrock
, cma.bbobbenchmarks._FSchaffersF7
, cma.bbobbenchmarks._FSphere
, cma.bbobbenchmarks._FStepEllipsoid
, cma.bbobbenchmarks._FTemplate
return noisy and noise-free value, the latter for recording purpose.