What is the benefit to supply the gradient for function minimization?

1 回表示 (過去 30 日間)
Pasquale
Pasquale 2017 年 11 月 7 日
編集済み: Honglei Chen 2017 年 11 月 7 日
Do you know if is it better to supply the gradient using 'fminunc'? For better I mean the time spent for analysis, and its accuracy.

採用された回答

Honglei Chen
Honglei Chen 2017 年 11 月 7 日
編集済み: Honglei Chen 2017 年 11 月 7 日
I'm not an expert on this, but I believe that if you don't provide the gradient function, then it has to be numerically estimated from your function. Thus providing the gradient (if available) can help the algorithm to converge faster.
  1 件のコメント
Pasquale
Pasquale 2017 年 11 月 7 日
I can valuate and provide the gradient, but it comes out from a lot of calculations, and my whole code runs on for loops with more than 1000 elements. So I don't know if it is more expensive to calculate the gradient through code lines, or let the solver fminunc do this. I should try and compare

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by