optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.
Related to #405: While that particular issue is somewhat fides-specific, the broader point relates to interpreting the convergence report produced by estimagic:
Maximize with 95 free parameters terminated unsuccessfully after 2802 iterations.
The value of criterion improved from -1184865.5053305852 to -1029883.7752618275.
Independent of the convergence criteria used by fides, the strength of convergence
can be assessed by the following criteria:
one_step five_steps
relative_criterion_change 1.066e-10** 8.185e-08*
relative_params_change 6.457e-08* 1.441e-07*
absolute_criterion_change 0.0001098 0.08429
absolute_params_change 2.969e-08* 5.068e-08*
(***: change <= 1e-10, **: change <= 1e-8, *: change <= 1e-5. Change refers to a
change between accepted steps. The first column only considers the last step.
The second column considers the last five steps.)
In particular, it would be good to have a page in the docs containing:
why these statistics are shown
pointers to literature
link to API docs of OptimizeResult.
While looking the API of OptimizeResult: I think I would find it helpful if it also contained any flags / defaults used like max_iterations. While flags set by users should be easy to retrieve usually it is also trivial to store them there. Not sure about defaults, the cost of extracting them is likely higher but so is the return (e.g., I set stopping_max_iterations myself but I would have no idea about how to extract the maximum number of function evaluations).
Related to #405: While that particular issue is somewhat fides-specific, the broader point relates to interpreting the convergence report produced by estimagic:
In particular, it would be good to have a page in the docs containing:
OptimizeResult
.While looking the API of
OptimizeResult
: I think I would find it helpful if it also contained any flags / defaults used likemax_iterations
. While flags set by users should be easy to retrieve usually it is also trivial to store them there. Not sure about defaults, the cost of extracting them is likely higher but so is the return (e.g., I setstopping_max_iterations
myself but I would have no idea about how to extract the maximum number of function evaluations).