Why is the FMINUNC function within the Optimization Toolbox 3.0 (R14) slower for some problems than it was in the Optimization Toolbox 2.3 (R13SP1)?

2 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
The FMINUNC function has a a new medium-scale algorithm in the Optimization Toolbox 3.0 (R14) than it did in previous versions. There are two reasons we have decided to implement this new method:
1. The new FMINUNC is a standard implementation of quasi-Newton, and, unlike the algorithm in version 2.3, it uses the gradient in the line search procedure. If you provide the gradient, version 3.0 is expected to be as fast (maybe faster) than in R13SP1.
However, if you do not provide the gradients, they have to be estimated via finite differences at the cost of additional function evaluations during the inner iterations of the line search procedure.
This new implementation of the method with a gradient-based line search has the advantage of being theoretically sound and guaranteed to terminate under MILS assumptions, though sometimes at the expense of requiring more evaluations to estimate the gradient.
2. Another reason why the new FMINUNC may take longer is that the stopping tests are now more stringent (again, they were changed because the old FMINUNC had some non-standard stopping tests). Check the values of "fval" and "norm(gradient, Inf)", where "fval" and "gradient" are output arguments from FMINUNC, and make sure they are about the same in both versions. If either "fval" is smaller or "norm(gradient,inf)" is closer to zero in the new version, try larger values for the "TolFun" and/or "TolX" option properties, and rerun the solver.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by