fminunc: get Hessian approximation after each iteration

조회 수: 3 (최근 30일)
Jason d'Eon
Jason d'Eon 2019년 11월 5일
편집: Matt J 2019년 11월 5일
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.

채택된 답변

Matt J
Matt J 2019년 11월 5일
편집: Matt J 2019년 11월 5일
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

추가 답변 (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