OptimizationResult#
- class lumopt2.core.optimization.OptimizationResult(success: bool, initial_fom: float, final_fom: float, optimal_params: ~numpy.ndarray, num_iterations: int, message: str = '', history: dict = <factory>)#
Immutable result object returned from an optimization run.
Frozen so user code cannot silently rewrite
final_fomoroptimal_paramsafter the fact. Thehistorydict is still mutable; callers who need a fully immutable snapshot shouldcopyit themselves.- Attributes:
- successbool
Whether the optimization completed successfully.
- initial_fom
float Initial figure of merit value.
- final_fom
float Final figure of merit value.
- optimal_params
np.ndarray Optimized parameter values.
- num_iterations
int Number of optimizer parameter updates performed. Iteration 0 is the baseline evaluation at the initial parameters and is not counted here, so a freshly-completed run with no improvements produces
num_iterations=0.- message
str,optional Message from the optimizer (default:
"").- history
dict,optional Optimization history with the following keys (default: empty dict):
'fom'list of floatFOM value at each iteration.
'params'list of np.ndarrayParameter array at each iteration.
'gradient'list of np.ndarrayGradient array at each iteration (empty for gradient-free optimizers).
Attributes