fminunc: get Hessian approximation after each iteration

1 visualización (últimos 30 días)
Jason d'Eon
Jason d'Eon el 5 de Nov. de 2019
Editada: Matt J el 5 de Nov. de 2019
I am using fminunc with quasi-Newton algorithms (BFGS and DFP). Is there is a way to record the approximation of the Hessian after each iteration? I looked at using the Outputfcn field, but the optimValues structure doesn't seem to include the Hessian updates.

Respuesta aceptada

Matt J
Matt J el 5 de Nov. de 2019
Editada: Matt J el 5 de Nov. de 2019
You could try running fminunc 1 iteration at a time in a for-loop and saving the 6th output arguments,
options.MaxIter=1;
for i=1:N
[x,~,~,~,~,hessian{i}] = fminunc(fun,x,options);
end

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by