fminunc: get Hessian approximation after each iteration

1 回表示 (過去 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 Center および File ExchangeSolver 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