optimizer
OptimizerBase
Base class for optimizers
objective_function
instance-attribute
objective_function: FitnessBase | Callable = objective_function
Objective function to optimize, the function's signature must be: f(x: Iterable) -> float
user_callback
instance-attribute
callback function that will be evaluated after each iteration
__init__
__init__(
objective_function: FitnessBase | Callable,
x0: ndarray,
*,
args: tuple = (),
bounds: ndarray | None = None,
callback: Callable[[Iterable], Any] | None = None,
maxiter: int = 1000,
maxfun: int = 10000,
**options
)
Initialize the optimizer
PARAMETER | DESCRIPTION |
---|---|
objective_function
|
Objective function
TYPE:
|
x0
|
Initial parameters
TYPE:
|
args
|
Additional arguments for the objective function
TYPE:
|
bounds
|
Bounds of the parameter
TYPE:
|
maxiter
|
Maximal number of iterations
TYPE:
|
maxfun
|
Maximal number of function evaluations
TYPE:
|
callback
|
Callback function that will be evaluated after each iteration
TYPE:
|
options
|
Optimizer-specific options |
fmin
classmethod
fmin(*args, **kwargs) -> OptimizerResult
Static method to do the optimization
PARAMETER | DESCRIPTION |
---|---|
args
|
Positional and keyword arguments for the optimizer
DEFAULT:
|
kwargs
|
Positional and keyword arguments for the optimizer
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
res
|
Optimize result
TYPE:
|