fminunc - why is it not possible to limit the step length?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Michael
el 8 de Mzo. de 2018
Respondida: Alan Weiss
el 9 de Mzo. de 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 comentarios
Respuesta aceptada
Alan Weiss
el 9 de Mzo. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!