Synthetic Objective Functions
The API references for synthetic objective functions. Please see the general objective class in API Cheatsheet.
Garland
- class PyXAB.synthetic_obj.Garland.Garland
Bases:
PyXAB.synthetic_obj.Objective.ObjectiveGarland objective implementation, with the domain [0, 1]
- __init__()
Initialization with fmax = 1
- f(x)
Evaluation of the chosen point in Garland function
- Parameters
x (list) – one input point in the form of x = [x1]
- Returns
y – Evaluated value of the function at the particular point x = [x1], returns x * (1 - x) * (4 - sqrt(abs(sin(60 * x))))
- Return type
float
DoubleSine
- class PyXAB.synthetic_obj.DoubleSine.DoubleSine(rho1=0.3, rho2=0.8, tmax=0.5)
Bases:
PyXAB.synthetic_obj.Objective.ObjectiveDoubleSine objective implementation, with the domain [0, 1]
- __init__(rho1=0.3, rho2=0.8, tmax=0.5)
Initialization with fmax = 0
- Parameters
rho1 (float) – The parameter rho1 between 0 and 1 to compute ep1
rho2 (float) – The parameter rho2 between 0 and 1 to compute ep2
tmax (float) – The parameter tmax between 0 and 1 to truncate x
- f(x)
Evaluation of the chosen point in DoubleSine function
- Parameters
x (list) – one input point in the form of x = [x1]
- Returns
y – Evaluated value of the function at the particular point x = [x1], returns mysin2(log(u, 2) / 2.0) * envelope_width - pow(u, self.ep2)
- Return type
float
HimmelBlau
- class PyXAB.synthetic_obj.Himmelblau.Himmelblau
Bases:
PyXAB.synthetic_obj.Objective.ObjectiveHimmelblau objective implementation, with the domain [-5, 5]^2
- __init__()
Initialization with fmax = 0
- f(x)
Evaluation of the chosen point in Himmelblau function
- Parameters
x (list) – one input point in the form of x = [x1, x2]
- Returns
y – Evaluated value of the function at the particular point x = [x1, x2], returns -((x1**2 + x2 - 11) ** 2) - (x1 + x2**2 - 7) ** 2
- Return type
float
Ackley
- class PyXAB.synthetic_obj.Ackley.Ackley
Bases:
PyXAB.synthetic_obj.Objective.ObjectiveAckley objective implementation, with the domain [-1, 1]^2
- __init__()
Initialization with fmax = 0
- f(x)
Evaluation of the chosen point in Ackley function
- Parameters
x (list) – one input point in the form of x = [x1, x2]
- Returns
y – Evaluated value of the function at the particular point x = [x1, x2], returns 20 * exp(-0.2 * sqrt(0.5 * (x1**2 + x2**2))) + exp(0.5 * (cos(2 * pi * x1) + cos(2 * pi * x2))) - e - 20
- Return type
float
Rastrigin
- class PyXAB.synthetic_obj.Rastrigin.Rastrigin
Bases:
PyXAB.synthetic_obj.Objective.ObjectiveRastrigin objective implementation, with the domain [-1, 1]^p
- __init__()
Initialization with fmax = 0
- f(x)
Evaluation of the chosen point in Rastrigin function
- Parameters
x (list) – one input point in the form of x = [x1, x2,…,xp]
- Returns
y – Evaluated value of the function at the particular point x = [x1, x2,…,xp], returns sum_i^p - 10 - (x[i] ** 2 - 10 * cos(2 * pi * x[i]))
- Return type
float
Difficult Function
- class PyXAB.synthetic_obj.DifficultFunc.DifficultFunc
Bases:
PyXAB.synthetic_obj.Objective.ObjectiveDifficultFunc objective implementation, with the domain [0, 1]
- __init__()
Initialization with fmax = 1
- f(x)
Evaluation of the chosen point in DifficultFunc function
- Parameters
x (list) – one input point in the form of x = [x1]
- Returns
y – Evaluated value of the function at the particular point x = [x1], returns threshold(log(y)) * (sqrt(y) - y**2) - sqrt(y)
- Return type
float