Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: [SOLVED] Re: How to use optimset for fminsearch to run Levenberg-Marquardt instead of Nelder-Mead?
Date: Thu, 29 Oct 2009 16:41:19 +0000 (UTC)
Organization: Link&#246;ping University
Lines: 57
Message-ID: <hccgjf$8e3$1@fred.mathworks.com>
References: <hcbn39$k4a$1@fred.mathworks.com> <hcc19l$neo$1@fred.mathworks.com> <hccahp$d2b$1@fred.mathworks.com> <hcce1u$rug$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256834479 8643 172.30.248.38 (29 Oct 2009 16:41:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Oct 2009 16:41:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1017447
Xref: news.mathworks.com comp.soft-sys.matlab:581044


John, Steven,

Thank you for your answers. Now I understand how this works. Before I looked "under the hood" of fminsearch I was under the impression that you could tell fminsearch to work with various solvers through the algorithm field in the optimset structure. Now I realize that I should have read the first table, last column, on this page more carefully as it describes the mapping between solver and optimset fields: http://www.mathworks.com/access/helpdesk/help/toolbox/optim/index.html?/access/helpdesk/help/toolbox/optim/ug/f19175.html

I can see how it could seem to be a "wild" assumption trying to pull a screwdriver out of a bread knife thinking its a Swiss army knife.

To conclude: Only parts of the optimset structure is applicable depending on which solver you are working with, and I see now that far from all optimset fields are applicable to all solvers. I get it now. Thanks for setting me on the right track.

/M.






"Steven Lord" <slord@mathworks.com> wrote in message <hcce1u$rug$1@fred.mathworks.com>...
> 
> "Magnus " <magax@itn.liu.se> wrote in message 
> news:hccahp$d2b$1@fred.mathworks.com...
> 
> *snip*
> 
> > Conclusion: fminsearch only uses Nelder-Mead and ignores 
> > 'LevenbergMarquardt', 'on' in the optimset input argument. No warning or 
> > error is given.
> 
> That's correct.  The reference page for FMINSEARCH lists the options it uses 
> in the Options section:
> 
> http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/fminsearch.html
> 
> as does this section of the Optimization Toolbox documentation:
> 
> http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/f19175.html
> 
> and the documentation for the optimization functions included as part of 
> MATLAB itself:
> 
> http://www.mathworks.com/access/helpdesk/help/techdoc/math/f2-14970.html#f2-23135
> 
> None of these places indicate that FMINSEARCH uses the LevenbergMarquardt 
> option, so it doesn't.
> 
> I predict that your next question will be why it doesn't error or warn if 
> you pass it an option that it doesn't use -- to that I echo John's comment 
> at the end of his post, and also offer an additional suggestion.  Suppose 
> you were comparing the behavior of two of the optimizers, one of which uses 
> an option that the other does not, and you want to perform as close to an 
> apples-to-apples comparison as you can.  In order to do so, you may pass the 
> same options structure into both optimizers and let each use only the 
> options it wants to use.
> 
> -- 
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ 
>