1
$\begingroup$

Assume I have some .m file with a function (and it's gradient) to be used by fminunc() in MATLAB for some unconstrained optimization problem.

To solve the problem in the most simple way, I do this:

clear all [x,fval] = fminunc(@fun, [1;1]) 

This will minimize fval and return the optimized values of x. For a more accurate optimization, I do this:

clear all op = optimset('GradObj', 'on', 'LargeScale', 'off'); [x,fval] = fminunc(@fun, [1;1], op) 

Both fval and x values still are the solution to the problem only that now they are more accurate, because of the supplied gradient. Correct?

Both of the above methods use the line-search algorithm but I can also use the trust-region algorithm, like this:

clear all op = optimset('GradObj', 'on'); [x,fval] = fminunc(@fun, [1;1], op) 

Both fval and x values are different from the previous ones. What does this mean? Is this algorithm better or worse? Or maybe it's different in a way that it's not better nor worse. What does it mean than?

  • 0
    Without saying what your `fun()` looks like, and the results you're getting, it's hard to say anything except that it is entirely possible for the two methods to return different results. These algorithms optimize *locally*, so it is entirely possible that the two methods converged to different local optima (if your function has multiple optima).2011-12-15
  • 0
    I can post the function but why does it matter? I simply want to know the meaning/difference between both algorithms...2011-12-15
  • 0
    Neither is better nor worse. The fact that both algorithms returned different results for the same set of inputs is usually a signal that there's something screwy with your function. As for meaning: they're both modifications of Newton-Raphson for optimization; the difference lies in the safeguards being used to tame the usual divergence seen in Newton-Raphson methods when the starting points are less than stellar. You'll want to look at [Dennis/Schnabel](http://books.google.com/books/?hl=en&id=RtxcWd0eBD0C) if you wish for more details.2011-12-15
  • 0
    Could you write a proper answer with your comments above so I can accept it?2011-12-15
  • 0
    You'll need to wait a bit; I'm busy with a few other things.2011-12-15
  • 0
    I have the same question and I 'm wondering to know if you find out the difference between two methods? thanks2013-05-02

1 Answers 1