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 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When I use the FMINUNC function in MATLAB 7.0 (R14), it takes longer for my minimization problem than it did in MATLAB 6.5.1 (R13).
Réponse acceptée
MathWorks Support Team
le 27 Juin 2009
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!