class documentation

class AbstractTestFunction(object):

Known subclasses: cma.bbobbenchmarks.BBOBFunction

View In Hierarchy

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
def __call__(self, x):

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
>>> 59.8733529 < f3([0, 1, 2]) < 59.87335292 # call f3, same as f3.evaluate([0, 1, 2])
True
def evaluate(self, x):

Returns the objective function value (in case noisy).

def getfopt(self):

Returns the best function value of this instance of the function.

def setfopt(self, fopt):

Undocumented

fopt =

Undocumented

_fopt =

Undocumented