Sphere#
(hivenas.benchmarks.sphere)
Shere optimization benchmark.
- class Sphere(dim, is_minimization=True)[source]#
Bases:
NumericalBenchmarkSphere optimization benchmark as given by
\[\sum_{i=0}^{\text{dim} - 1} (X_{i}^{2})\]- evaluate(pos)[source]#
Evaluate a given position
- Parameters
pos (list) – list of position components (floats)
- Returns
fitness value of the given position along with the static data required by
ObjectiveInterface- Return type
dict
- momentum_eval(pos, weights, m_epochs)[source]#
Redundant implementation as
evaluateto satisfy theObjectiveInterfacehooks- Parameters
pos (list) – list of position components (floats)
weights (str) – N/A
m_epochs (int) – N/A
- Returns
a dictionary containing the evaluated fitness value
- Return type
dict