Module cma :: Class FitnessFunctions
[hide private]
[frames] | no frames]

Class FitnessFunctions

source code

object --+
         |
        FitnessFunctions

versatile container for test objective functions
Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
rot(self, x, fun, rot=1, args=())
returns fun(rotation(x), *args), ie. fun applied to a rotated argument
source code
 
somenan(self, x, fun, p=0.1)
returns sometimes np.NaN, otherwise fun(x)
source code
 
rand(self, x)
Random test objective function
source code
 
linear(self, x) source code
 
lineard(self, x) source code
 
sphere(self, x)
Sphere (squared norm) test objective function
source code
 
grad_sphere(self, x, *args) source code
 
grad_to_one(self, x, *args) source code
 
sphere_pos(self, x)
Sphere (squared norm) test objective function
source code
 
spherewithoneconstraint(self, x) source code
 
elliwithoneconstraint(self, x, idx=[-1]) source code
 
spherewithnconstraints(self, x) source code
 
noisysphere(self, x, noise=2.1e-09, cond=1.0, noise_offset=0.1)
noise=10 does not work with default popsize, noise handling does not help
source code
 
spherew(self, x)
Sphere (squared norm) with sum x_i = 1 test objective function
source code
 
partsphere(self, x)
Sphere (squared norm) test objective function
source code
 
sectorsphere(self, x)
asymmetric Sphere (squared norm) test objective function
source code
 
cornersphere(self, x)
Sphere (squared norm) test objective function constraint to the corner
source code
 
cornerelli(self, x) source code
 
cornerellirot(self, x) source code
 
normalSkew(self, f) source code
 
noiseC(self, x, func=<function sphere at 0x106bf6c08>, fac=10, expon=0.8) source code
 
noise(self, x, func=<function sphere at 0x106bf6c08>, fac=10, expon=1) source code
 
cigar(self, x, rot=0, cond=1000000.0, noise=0)
Cigar test objective function
source code
 
grad_cigar(self, x, *args) source code
 
diagonal_cigar(self, x, cond=1000000.0) source code
 
tablet(self, x, rot=0)
Tablet test objective function
source code
 
grad_tablet(self, x, *args) source code
 
cigtab(self, y)
Cigtab test objective function
source code
 
twoaxes(self, y)
Cigtab test objective function
source code
 
ellirot(self, x) source code
 
hyperelli(self, x) source code
 
halfelli(self, x) source code
 
elli(self, x, rot=0, xoffset=0, cond=1000000.0, actuator_noise=0.0, both=False)
Ellipsoid test objective function
source code
 
grad_elli(self, x, *args) source code
 
fun_as_arg(self, x, *args)
fun_as_arg(x, fun, *more_args) calls fun(x, *more_args).
source code
 
grad_numerical(self, x, func, epsilon=None)
symmetric gradient
source code
 
elliconstraint(self, x, cfac=100000000.0, tough=True, cond=1000000.0)
ellipsoid test objective function with "constraints"
source code
 
rosen(self, x, alpha=100.0)
Rosenbrock test objective function
source code
 
grad_rosen(self, x, *args) source code
 
diffpow(self, x, rot=0)
Diffpow test objective function
source code
 
rosenelli(self, x) source code
 
ridge(self, x, expo=2) source code
 
ridgecircle(self, x, expo=0.5)
happy cat by HG Beyer
source code
 
happycat(self, x, alpha=0.125) source code
 
flat(self, x) source code
 
branin(self, x) source code
 
goldsteinprice(self, x) source code
 
griewank(self, x) source code
 
rastrigin(self, x)
Rastrigin test objective function
source code
 
schaffer(self, x)
Schaffer function x0 in [-100..100]
source code
 
schwefelelli(self, x) source code
 
schwefelmult(self, x, pen_fac=10000.0)
multimodal Schwefel function with domain -500..500
source code
 
optprob(self, x) source code
 
lincon(self, x, theta=0.01)
ridge like linear function with one linear constraint
source code
 
rosen_nesterov(self, x, rho=100)
needs exponential number of steps in a non-increasing f-sequence.
source code
 
powel_singular(self, x) source code
 
styblinski_tang(self, x)
in [-5, 5]
source code
 
trid(self, x) source code
 
bukin(self, x)
Bukin function from Wikipedia, generalized simplistically from 2-D.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

fun_as_arg(self, x, *args)

source code 

fun_as_arg(x, fun, *more_args) calls fun(x, *more_args).

Use case:

fmin(cma.fun_as_arg, args=(fun,), gradf=grad_numerical)

calls fun_as_args(x, args) and grad_numerical(x, fun, args=args)

rosen_nesterov(self, x, rho=100)

source code 

needs exponential number of steps in a non-increasing f-sequence.

x_0 = (-1,1,...,1) See Jarre (2011) "On Nesterov's Smooth Chebyshev-Rosenbrock Function"

bukin(self, x)

source code 

Bukin function from Wikipedia, generalized simplistically from 2-D.

http://en.wikipedia.org/wiki/Test_functions_for_optimization