optimize#
- abstractmethod BaseOptimizer.optimize(objective_func: Callable[[ndarray], float], gradient_func: Callable[[ndarray], ndarray], initial_params: ndarray, callback: Callable[[ndarray], None] | None = None) Tuple[ndarray, float]#
Run the optimization and return the best parameters and FOM.
- Parameters:
- objective_func
Callable[[np.ndarray],float] Function that computes the objective (FOM) value given parameters. Should return a scalar value to be maximized.
- gradient_func
Callable[[np.ndarray],np.ndarray] Function that computes the gradient of the objective with respect to parameters. Must return an array of the same shape as the input parameters.
- initial_params
np.ndarray Initial parameter values to start optimization.
- callback
Callable[[np.ndarray],None],optional Optional callback called after each iteration with the current parameter values (default: None).
- objective_func
- Returns:
np.ndarrayOptimized parameter values.
floatFinal FOM value at the optimized parameters.