fminunc - why is it not possible to limit the step length?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Michael
le 8 Mar 2018
Réponse apportée : Alan Weiss
le 9 Mar 2018
hello, i'm using fminunc to solve a complex optimization problem involving gaussian distributions with symmetric, pos. def. covariance matrices. note that my optimization variables are not the entries of the covariance matrices. while the optimization process (with fminunc) at some point there is an error, that one covariance matrix isnt sym., pos. def. anymore, because the dedicated cholesky decomposition doesnt work anymore. the problem is that fminunc acts to "aggressiv" regarding my optimization problem. in order to overcome this issue i want to limit/bound the stepsize (the scalar that gets multiplied with the gradient; not the stepsize of the finite difference gradient approximation). however, there is no way to limit the stepsize? why is that the case? i used some open-source optimizer, where the stepsize can be adjusted, and everything works fine... my conlusion: the linesearch algorithm of fmincon is not up to date.
0 commentaires
Réponse acceptée
Alan Weiss
le 9 Mar 2018
It sounds like you are using fminunc on a problem that has constraints. This is the wrong tool for the problem.
If you have a constraint that a derived matrix is positive definite (I assume that it is always symmetric), then your constraint is that the minimum eigenvalue of that matrix is zero or greater. Something like this:
function [c,ceq] = mycons(x)
ceq = [];
H = myfun(x); % Calculate the derived matrix
t = min(eig(H));
c = -t;
Set that as your nonlinear constraint, start from a feasible point, and fmincon should do well, especially using the default 'interior-point' algorithm.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
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!