Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
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 11:58:40 -0400
Organization: The MathWorks, Inc.
Lines: 42
Message-ID: <hcce1u$rug$1@fred.mathworks.com>
References: <hcbn39$k4a$1@fred.mathworks.com> <hcc19l$neo$1@fred.mathworks.com> <hccahp$d2b$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1256831870 28624 172.31.44.65 (29 Oct 2009 15:57:50 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Oct 2009 15:57:50 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:581023



"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