opytimizer.core.optimizer¶
Optimizer.
-
class
opytimizer.core.optimizer.
Optimizer
¶ An Optimizer class that holds meta-heuristics-related properties and methods.
-
__init__
() → None¶ Initialization method.
-
algorithm
¶ Algorithm’s name.
Type: str
-
built
¶ Indicates whether the optimizer is built.
-
params
¶ Key-value parameters.
-
build
(params: Dict[str, Any]) → None¶ Builds the object by creating its parameters.
Parameters: params – Key-value parameters to the meta-heuristic.
-
compile
(space: opytimizer.core.space.Space) → None¶ Compiles additional information that is used by this optimizer.
This method is called before the optimization procedure and makes sure that the additional variable is available as a property.
-
evaluate
(space: opytimizer.core.space.Space, function: opytimizer.core.function.Function) → None¶ Evaluates the search space according to the objective function.
If you need a specific evaluate method, please re-implement it on child’s class.
Also, note that function only accept arguments that are found on Opytimizer class.
Parameters: - space – A Space object that will be evaluated.
- function – A Function object serving as an objective function.
-
update
() → None¶ Updates the agents’ position array.
As each child has a different procedure of update, you will need to implement it directly on its class.
Also, note that function only accept arguments that are found on Opytimizer class.
-