Base#
(hivenas.benchmarks.base)
Abstract ObjectiveInterface class for numerical benchmarks.
- class NumericalBenchmark(dim, minv, maxv, minimization)[source]#
Bases:
ObjectiveInterfaceAbstract class for Numerical Optimization Benchmarks
- dim#
number of dimensions for the given benchmark
- Type
int
- maxv#
maximum value in the search space
- Type
float
- minv#
minimum value in the search space
- Type
float
- minimization#
determines whether this is a minimization or maximization problem
- Type
bool
- fully_train_best_model(from_arch: bool = True)[source]#
Exception handler for
fully_train_best_modelon NumericalBenchmarks- Raises
ValueError – raised when
fully_train_best_modelis called on a NumericalBenchmark- Parameters
from_arch (bool, optional) – N/A
- get_neighbor(pos)[source]#
Finds a random neighbor by displacing 1 positional component by \(\phi\)
- Parameters
pos (list) – list of positional components (floats)
- Returns
a neighboring position
- Return type
list
- property is_minimize#
Minimization toggle getter
- Returns
determines whether this is a minimization or maximization problem
- Return type
bool
- property maximum#
The maximum value getter
- Returns
maximum value for a position component
- Return type
float
- property minimum#
The minimum value getter
- Returns
minimum value for a position component
- Return type
float