is there any command which uses gradient descent to find a minima ?

1 次查看(过去 30 天)
I want to run gradient descent to find a minima for some differentiable function. Is there any command in matlab which does this ? is it available in optimization tool box?

回答(1 个)

John D'Errico
John D'Errico 2016-4-14
编辑:John D'Errico 2016-4-14
Why do you think you need explicitly gradient descent? Steepest descent (i.e., directly following the gradient downhill) is often a terribly poor method for minimization in general.
Yes, there are several tools in MATLAB that do optimization. Everything from a Nelder-Mead tool (fminsearch) to more sophisticated tools in the optimization toolbox. It depends on what you have, i.e. constraints or not, and what type of objective function you have, linear or nonlinear. But there are no tools provided by The MathWorks that explicitly do steepest descent, as there are far better schemes available.
So, perhaps you are asking for a general tool that USES the gradient in a more intelligent manner than steepest descent, but just asked the question in a confusing way. Again, yes. Look in the optimization toolbox. You will probably want either fmincon or fminunc.

类别

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